免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2682 | 回复: 3
打印 上一主题 下一主题

[proxy] 请教:squid不能转向apache [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-12 15:54 |只看该作者 |倒序浏览
[hostname]#./squid -Nd1       可以正常启动,该窗口信息如下:

2010/01/12 15:35:16| clientReadRequest: FD 15 (100.20.100.215:3240) Invalid Request
2010/01/12 15:35:16| clientReadRequest: FD 15 (100.20.100.215:3241) Invalid Request
2010/01/12 15:35:17| clientReadRequest: FD 15 (100.20.100.215:3242) Invalid Request
2010/01/12 15:35:17| clientReadRequest: FD 15 (100.20.100.215:3243) Invalid Request

客户端访问报错信息如下:
ERRORThe requested URL could not be retrievedWhile trying to process the request: GET / HTTP/1.1Accept: */*Accept-Language: zh-cnAccept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)Host: 10.207.0.33Connection: Keep-AliveThe 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


客户端访问时不能看到apache页面,这是为什么呢? 应该说这个问题很常见才对,我在网上搜不到答案

[ 本帖最后由 shicaoyi 于 2010-1-12 16:56 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2010-01-12 15:55 |只看该作者

回复 #1 shicaoyi 的帖子

apache是用的81端口,直接访问81端口倒是没有问题。
附上squid.conf内容,高手指点下, 3Q

http_port 80
icp_port 0
acl QUERY urlpath_regex cgi-bin
no_cache deny QUERY
cache_mem 16 MB
cache_dir ufs /data1/squid2/var/cache 100 16 256
log_icp_queries off
buffered_logs on
emulate_httpd_log on
redirect_rewrites_host_header off
half_closed_clients off
acl all src 0.0.0.0/0.0.0.0
http_access allow all
cache_mgr admin
cache_effective_user squid
cache_effective_group squid
httpd_accel_host virtual
httpd_accel_uses_host_header on
httpd_accel_host 100.20.0.33
httpd_accel_port 81

[ 本帖最后由 shicaoyi 于 2010-1-12 16:59 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2010-01-13 11:40 |只看该作者
问题已解决,是squid版本的问题。 squid2.5前和2.5后配置文件的一些指令不一样,所以导致有些指令无效。

论坛徽章:
0
4 [报告]
发表于 2010-01-13 11:41 |只看该作者

回复 #3 shicaoyi 的帖子

谢谢3楼的大侠 .......
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP