[proxy] 为什么我的Squid有时不能自动启动?
为什么我的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有能够自动启动,而且很正常!不解
...全文
相关推荐
vagrant-ansible-squid-proxy-cache:带Vagrant和Ansible的鱿鱼代理
项目中的“vagrant-ansible-squid-proxy-cache-master”可能是一个包含Vagrantfile的目录,Vagrantfile是用来配置和启动虚拟机的配置文件。
Linux搭建Squid透明代理及squid+icap环境
配置Squid与ICAP通信在Squid配置文件中,添加以下行启用ICAP支持:```conficap_enable onicap_service proxy_predicates icap://127.0.0.1
centos 7 安装配置带用户认证的squid代理服务器
3223617729@qq.com```#### 四、初始化 Squid启动前需要进行初始化操作以确保缓存目录正确建立:```bashsudo squid -z```#### 五、启动 Squid使用
Centos搭建代理服务器squid
```acl ncsa_users proxy_auth REQUIREDhttp_access allow ncsa_usershttp_access deny all```这些配置项指定了认证用户的
squid安装配置步骤
**启动Squid服务**: 使用Squid的启动脚本来启动服务: ``` /squid/proxy/sbin/squid ```7.


其他技术讨论专区
