免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9961 | 回复: 6

[FreeBSD] squid安装提示"The requested URL could not be retrieved" [复制链接]

论坛徽章:
0
发表于 2011-08-27 01:49 |显示全部楼层
本帖最后由 cfanbo 于 2011-08-27 02:03 编辑

freebsd用的ports安装的
ERROR

The requested URL could not be retrieved



The following error was encountered:

Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:

Missing or unknown request method
Missing URL
Missing HTTP Identifier (HTTP/1.0)
Request is too large
Content-Length missing for POST or PUT requests
Illegal character in hostname; underscores are not allowed

squid.conf
  1. visible_hostname www.abccache.com
  2. cache_mgr haohtml@gmail.com
  3. http_port 3128 accel vhost vport

  4. cache_mem 512 MB
  5. maximum_object_size_in_memory 6 MB

  6. memory_replacement_policy lru

  7. cache_dir ufs /var/squid/cache 2048 16 256
  8. max_open_disk_fds 0

  9. cache_swap_low 80
  10. cache_swap_high 97

  11. minimum_object_size 0 KB
  12. maximum_object_size 30 MB

  13. logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss
  14. access_log /var/squid/logs/page_zs_access_log combined

  15. cache_log /var/squid/logs/cache.log
  16. cache_store_log none   

  17. cache_peer 192.168.0.100 parent 80 0 no-query no-digest originserver name=wwwabccom
  18. cache_peer_domain wwwabccom www.abc.com
  19. cache_peer_access wwwabccom allow all

  20. http_access allow all

  21. acl QUERY urlpath_regex .php .pl .cgi
  22. cache deny QUERY

  23. cache_effective_user squid
  24. cache_effective_group squid
复制代码
参考:http://blog.haohtml.com/archives/5920,以前没有用ports安装,测试过这个教程没有任何问题的.现在squid用的3128端口,web用的是80端口的,如果测试通过的后,将两个端口换一下就可以了.

论坛徽章:
0
发表于 2011-08-27 09:43 |显示全部楼层

论坛徽章:
0
发表于 2011-08-27 21:15 |显示全部楼层
求高人指点一下呀

论坛徽章:
0
发表于 2011-08-30 08:35 |显示全部楼层
我看你的配置晕乎乎的,你做反向?

论坛徽章:
0
发表于 2011-09-05 16:12 |显示全部楼层
要实现的是反向代理,只是暂时端口没有调换过来而已.等配置没有什么问题的话,再换一下即可

论坛徽章:
0
发表于 2011-09-05 18:17 |显示全部楼层
为什么不用ports呢?
答,装叉

论坛徽章:
0
发表于 2011-09-05 19:33 |显示全部楼层
用的就是ports安装的,生产上用的是2.7的版本的,我只是将上面的配置直接放在了squid.conf文件的最后了.但上面默认配置里有一个http_access deny all,所以提示"access deny"信息的.另外一个就是用的端口3128的问题了,最上面safe_port没有这个端口的(原来将上面的取消了),后来加上这个就可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP