免费注册 查看新帖 |

Chinaunix

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

[proxy] 做代理时页面显示的怪问题(已解决) [复制链接]

论坛徽章:
0
发表于 2006-06-11 14:48 |显示全部楼层
我使用squid作反向代理,启动和访问都没问题,

但是我在访问这样的网址:http://xxx.xxx.com/xxx时显示找不到页面
如果手动在http://xxx.xxx.com/xxx 加上一个"/"变成http://xxx.xxx.com/xxx/时就可以访问了,


真是怪,是不是我的配置文件有问题
http_port 80
icp_port 0
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir ufs /database/webroot/squid 1024 16 256
cache_mem 1000 MB
cache_effective_user squid
cache_effective_group squid
#
visible_hostname house365
log_icp_queries off
buffered_logs on
emulate_httpd_log on
redirect_rewrites_host_header off
half_closed_clients off
refresh_pattern -i \.jpg$ 10 50% 4320 reload-into-ims
refresh_pattern -i \.png$ 10 50% 4320 reload-into-ims
refresh_pattern -i \.swf$ 10 50% 4320 reload-into-ims
refresh_pattern -i \.htm$ 0 20% 1440
refresh_pattern -i \.html$ 0 20% 1440
refresh_pattern -i . 5 25% 2880
acl all src 0.0.0.0/0.0.0.0
http_access allow all
httpd_accel_host 172.17.1.50
httpd_accel_port 80

请高手看一下

谢了

[ 本帖最后由 njblue2004 于 2006-6-12 14:34 编辑 ]

论坛徽章:
0
发表于 2006-06-12 13:04 |显示全部楼层
我的squid和web是两台服务器
其中squid是外网地址,web是内网地址

这个问题没人回答吗?

论坛徽章:
0
发表于 2006-06-12 14:13 |显示全部楼层
解决了
修改了配置

httpd_accel_single_host on

httpd_accel_host 172.16.1.1

httpd_accel_uses_host_header on

论坛徽章:
0
发表于 2006-06-12 14:54 |显示全部楼层
能将完整的配置过程写下来吗?
很感谢你啊,同时做好吧iptables方面的设置也加上

论坛徽章:
0
发表于 2006-06-14 14:05 |显示全部楼层
http_port 80
icp_port 0
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir ufs /database/webroot/squid 1024 16 256
cache_mem 1000 MB
cache_effective_user squid
cache_effective_group squid
#
visible_hostname house365
log_icp_queries off
buffered_logs on
emulate_httpd_log on
redirect_rewrites_host_header off
half_closed_clients off
refresh_pattern -i \.jpg$ 10 50% 4320 reload-into-ims
refresh_pattern -i \.png$ 10 50% 4320 reload-into-ims
refresh_pattern -i \.swf$ 10 50% 4320 reload-into-ims
refresh_pattern -i \.htm$ 0 20% 1440
refresh_pattern -i \.html$ 0 20% 1440
refresh_pattern -i . 5 25% 2880
#acl Manager proto cache_object
#acl Localhost src 127.0.0.1/255.255.255.255
#acl remote src 218.94.75.145/255.255.255.255
#http_access allow Manager Localhost remote
#http_access deny Manager
acl all src 0.0.0.0/0.0.0.0
http_access allow all
httpd_accel_single_host on
httpd_accel_uses_host_header on
httpd_accel_host 172.17.1.50
httpd_accel_port 80
这是我的全部配置

我还想问一下,我测试了一下,我是2个X3.0CPU,4G内存,但是CPU使用很低,我也问过squid不支持smp

不知道如何解决呢?

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
发表于 2006-06-16 15:06 |显示全部楼层
原帖由 njblue2004 于 2006-6-14 14:05 发表
我还想问一下,我测试了一下,我是2个X3.0CPU,4G内存,但是CPU使用很低,我也问过squid不支持smp

不知道如何解决呢?

squid的CPU的需求比较低,比较古老的CPU都可以轻松应付,所以楼主不必太再意SMP的问题。实际上,大的磁盘,尤其是大内存对squid的性能而言要重要得多。

论坛徽章:
0
发表于 2006-06-27 21:45 |显示全部楼层

回复 1楼 njblue2004 的帖子

你可以运行两个squid ,当然要重新编译

论坛徽章:
0
发表于 2006-07-25 18:11 |显示全部楼层
不用编译...squid -f conf1   squid -f conf2
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP