dajiangyou
发表于 2013-7-20 21:14:05
dajiangyou 发表于 2013-7-20 23:02
上次bandwagonhost的9.9刀512M那个
不是,是squid配置文件,我的是3.1的,你是2.6的,可能会不同,我看你的配置然后修改
hcw1588
发表于 2013-7-20 21:12:00
hcw1588 发表于 2013-7-20 23:03
不是,是squid配置文件,我的是3.1的,你是2.6的,可能会不同,我看你的配置然后修改 ...
http_port 51776
visible_hostname Aliyun
cache_mgr *****@gmail.com
hosts_file /etc/hosts
dns_nameservers 8.8.8.8 8.8.4.4
acl QUERY urlpath_regex cgi-bin/? /.php /.css
no_cache deny QUERY
acl manager proto cache_object
acl Purge method PURGE
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl banip src “/etc/squid/banip”
acl banmac arp “/etc/squid/banmac”
http_access allow Purge Localhost
http_access deny Purge
http_access allow manager
http_access allow localnet
http_access allow localhost
http_access allow all
http_access deny banmac
http_access deny banip
request_header_access Via deny all
request_header_access X-Forwarded-For deny all
#reply_header_access Via deny all
#reply_header_access X-Forwarded-For deny all
cache_mem 128 MB
maximum_object_size 20 MB
maximum_object_size_in_memory 20 MB
cache_swap_low 90
cache_swap_high 95
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LRU
cache_dir aufs /var/spool/squid 1024 16 256
coredump_dir /var/spool/squid
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
referer_log /var/log/squid/referer.log
useragent_log /var/log/squid/useragent.log
logfile_rotate 7
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
refresh_pattern -i \.flv$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.swf$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.jpg$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.bmp$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.png$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.gif$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.mp3$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.mp4$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.mov$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.wmv$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.wma$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.rm$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.ipa$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.exe$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.cab$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.apk$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.deb$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.zip$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.rar$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.tar.gz$ 4320 100% 43200 reload-into-ims ignore-reload
refresh_pattern -i \.rpm$ 4320 100% 43200 reload-into-ims ignore-reload
range_offset_limit 20 MB
range_offset_limit -1 KB
quick_abort_min -1 KB
forwarded_for off
client_persistent_connections off
server_persistent_connections on
client_db on
防和谐防和谐防和谐防和谐防和谐防和谐
dajiangyou
发表于 2013-7-20 21:21:25
dajiangyou 发表于 2013-7-20 23:05
http_port 51776
visible_hostname Aliyun
cache_mgr *****@gmail.com
acl manager proto cache_object
acl Purge method PURGE
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl banip src “/etc/squid/banip”
acl banmac arp “/etc/squid/banmac”
http_access allow Purge Localhost
http_access deny Purge
http_access allow manager
http_access allow localnet
http_access allow localhost
http_access allow all
http_access deny banmac
http_access deny banip
替换为
acl all src 0.0.0.0/0.0.0.0
http_access allow all
然后输入squid -k parse看看有没有错误,没有的话就直接启动吧
hcw1588
发表于 2013-7-20 20:56:00
hcw1588 发表于 2013-7-20 23:11
acl manager proto cache_object
acl Purge method PURGE
acl localhost src 127.0.0.1/32
2013/07/20 19:27:56| parseConfigFile: line 31 unrecognized: 'request_header_access Via deny all'
2013/07/20 19:27:56| parseConfigFile: line 32 unrecognized: 'request_header_access X-Forwarded-For deny all'
2013/07/20 19:27:56| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2013/07/20 19:27:56| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2013/07/20 19:27:56| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
2013/07/20 19:27:56| WARNING: Very large maximum_object_size_in_memory settings can have negative impact on performance
002.gif
002.gif
002.gif
002.gif
真不想折腾了,太蛋疼了。。。。
hcw1588
发表于 2013-7-20 20:56:40
dajiangyou 发表于 2013-7-20 23:20
2013/07/20 19:27:56| parseConfigFile: line 31 unrecognized: 'request_header_access Via deny all'
2 ...
额。。。你把
request_header_access Via deny all
request_header_access X-Forwarded-For deny all
改为
header_access Via deny all
header_access X-Forwarded-For deny all
就行了,,只有以上这么多是吗?WARNING基本不用管。
hcw1588
发表于 2013-7-20 21:14:00
dajiangyou 发表于 2013-7-20 23:20
2013/07/20 19:27:56| parseConfigFile: line 31 unrecognized: 'request_header_access Via deny all'
2 ...
其实这也是squid3.1和squid2.6的区别。。。
hcw1588
发表于 2013-7-20 21:25:59
dajiangyou 发表于 2013-7-20 23:20
2013/07/20 19:27:56| parseConfigFile: line 31 unrecognized: 'request_header_access Via deny all'
2 ...
忘了一件事,不知道是不是,可以把0.0.0.0/0.0.0.0改成all
hcw1588 发表于 2013-7-20 23:23
额。。。你把
request_header_access Via deny all
request_header_access X-Forwarded-For deny all
果然好了,端口号貌似真不能无限大,浏览器设置6位的端口号就直接没反应了。。。
非常感谢。。。
017.gif
dajiangyou
发表于 2013-7-20 21:22:00
dajiangyou 发表于 2013-7-20 23:40
果然好了,端口号貌似真不能无限大,浏览器设置6位的端口号就直接没反应了。。。
非常感谢。。。 ...
你不是准备用http代理上网代理吧。。。。你vps在国外吧。。一旦访问被墙的,会屏蔽端口数分钟的。。。。
hcw1588
发表于 2013-7-20 21:49:35
orvice 发表于 2013-7-20 22:55
你博客打开真慢
你再看看,现在加cdn了。
dajiangyou
发表于 2013-7-20 21:25:00
hcw1588 发表于 2013-7-20 23:42
你不是准备用http代理上网代理吧。。。。你vps在国外吧。。一旦访问被墙的,会屏蔽端口数分钟的。。。。 ...
代理不就是爬墙的么,不能爬那不是瞎折腾这么久了
020.gif