免费注册 查看新帖 |

Chinaunix

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

[proxy] redhat 5.4 squid 问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-10-17 16:07 |只看该作者 |倒序浏览
redhat as 5.4 ,  安装自带的 squid-2.6.STABLE21-3.el5.i386.rpm 包 。

cat /etc/squid/squid.conf 如下

http_port 8080

hierarchy_stoplist cgi-bin ?
hierarchy_stoplist -i ^https:\\ ?
acl QUERY urlpath_regex -i cgi-bin \? \.asp \.php \.jsp \.cgi
acl denyssl urlpath_regex -i ^https:\\
no_cache deny QUERY
no_cache deny denyssl

cache_mem 512 MB
cache_swap_low 90
cache_swap_high 95
cache_effective_user squid
cache_effective_group  squid
dns_nameservers 168.126.63.1

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_dir ufs /var/spool/squid 4096 16 256  
coredump_dir /var/spool/squid/cache

visible_hostname localhost
cache_mgr webmaster@localhost

maximum_object_size 4096 KB
maximum_object_size_in_memory 8 KB

ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024

pid_filename /var/log/squid.pid

#  TAG: acl
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
#acl SSL_ports port 443 563
acl Safe_ports port 80                # http
#acl Safe_ports port 21                # ftp
#acl Safe_ports port 443 563        # https, snews
#acl Safe_ports port 70                # gopher
#acl Safe_ports port 210                # wais
#acl Safe_ports port 1025-65535        # unregistered ports
#acl Safe_ports port 280                # http-mgmt
#acl Safe_ports port 488                # gss-http
#acl Safe_ports port 591                # filemaker
#acl Safe_ports port 777                # multiling http
#acl CONNECT method CONNECT

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

#acl lan1 src 192.168.168.0/24
acl lan2 src 172.16.200.0/24
acl all src 0.0.0.0/0
#http_access allow lan1
http_access allow lan2

http_access allow manager localhost
http_access deny all

#======================================

初始化  /usr/sbin/squid -z 结果如下

[root@localhost etc]# /usr/sbin/squid -z
2010/10/17 23:32:50| parseConfigFile: line 74 unrecognized: 'httpd_accel_host virtual'
2010/10/17 23:32:50| parseConfigFile: line 75 unrecognized: 'httpd_accel_port 80'
2010/10/17 23:32:50| parseConfigFile: line 76 unrecognized: 'httpd_accel_with_proxy on'
2010/10/17 23:32:50| parseConfigFile: line 77 unrecognized: 'httpd_accel_uses_host_header on'
2010/10/17 23:32:50| Creating Swap Directories

初始化失败;。

哪位见过这种情况? 请指点一下哦。。

论坛徽章:
0
2 [报告]
发表于 2010-10-17 23:04 |只看该作者
2.6没用这种配置方法
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

论坛徽章:
0
3 [报告]
发表于 2010-10-18 12:16 |只看该作者
1。 我把下面的4行注销掉。。
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

2。 http_port 8080  这里加 transparent

http_port 8080 transparent

这样正常启动了 不过得看看squid 是不是正常工作。。

多谢了。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP