[proxy] 为什么我的Squid有时不能自动启动?

weixin_38051479 weixin_38051479 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

为什么我的Squid有时不能自动启动?
我的linux代理服务器上有两块网卡,一块主内一块主外,使用iptables+squid的透明代理,有时早晨上班我打开linux代理服务器很长时间(大概有20分钟)后发现pc都不能上网,但msn可以上我telnet上去一看,ps aux|grep squid
  发现没有squid的进程。然后我手动去执行/etc/rc.d/proxy(proxy实际上是一个脚本,我把这个脚本又放到rc.local里,让它启动自动执行),然后squid可以启动,上网正常。
我的squid.conf

http_port 192.168.0.1:3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 16 MB
cache_dir ufs /usr/local/squid/cache 1024 16 256
cache_swap_low 90
cache_swap_high 95
unlinkd_program /usr/local/squid/libexec/unlinkd
half_closed_clients off
maximum_object_size 1024 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_access_log /usr/local/squid/var/logs/access.log
dns_nameservers 211.98.2.4 202.103.0.68 202.103.24.67 202.103.0.117 202.96.134.133 202.96.128.68
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
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
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
acl advance src 192.168.0.0/24
http_access allow advance
http_access deny all
http_reply_access allow all
icp_access allow all
icp_access allow all
cache_effective_user nobody
cache_effective_group nobody
### cache admin
visible_hostname www.163.com
cache_mgr ljily000@163.com
cachemgr_passwd 000000
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
error_directory /usr/local/squid/share/errors/Simplify_Chinese
coredump_dir /var/spool/squid
cache_effective_user nobody
cache_effective_group nobody
复制代码
为什么大多数情况下squid有能够自动启动,而且很正常!不解
...全文
评论 7
收藏 已收藏
分享
返回顶部