13日wd 发表于 2015-12-17 08:33:25

squid配置文件

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8   # RFC1918 possible internal network
acl localnet src 172.16.0.0/12# RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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 localnet
http_access allow localhost
http_access deny all
https_port 923

cache_mem 8 MB
cache_dir ufs /var/spool/squid 100 16 256
coredump_dir /var/spool/squid


minimum_object_size 0 KB
maximum_object_size 4096 KB
cache_swap_low 90
cache_swap_high 95

access_log /var/log/squid/access.log squid
ftp_user squid@
ftp_passive on

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

cache_mgr root
cache_effective_user squid
cache_effective_group squid

visible_hostname www.fwc.com
ipcache_size 1024
ipcache_low 90
ipcache_high 95









acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl localnet src 10.0.0.0/8   # RFC1918 possible internal network
acl localnet src 172.16.0.0/12# RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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
acl ip01 src 192.168.0.20/24 192.168.0.21/24
acl ip02 src 192.168.0.10-192.168.0.15/24
acl ip03srcdomain .baidu.com
acl yuming01 dstdomain .taobao.com
acl url01url_regex ^http://www.baidu.com/.*
acl dropdomain dstdomain "/etc/squid/dropdomain.txt"
acl QUERY urlpath_regex cgi-bin \?
acl denyphp urlpath_regex \.php$

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_access all ip01
cache deny QUERY
cache deny denyphp
http_port 3128


cache_mem 32 MB
cache_dir ufs /var/spool/squid 100 16 256
cache_dir ufs /srv/squid 5016256
coredump_dir /var/spool/squid


minimum_object_size 0 KB
maximum_object_size 4096 KB
cache_swap_low 90
cache_swap_high 95

access_log /var/log/squid/access.log squid
ftp_user squid@
ftp_passive on

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 \.fwc\.         120   50%   1440

cache_mgr root
cache_effective_user squid
cache_effective_group squid

visible_hostname www.fwc.com
ipcache_size 1024
ipcache_low 90
ipcache_high 95


页: [1]
查看完整版本: squid配置文件