Last active
September 7, 2015 15:20
-
-
Save benjiao/2d551a2c4d6a75588036 to your computer and use it in GitHub Desktop.
Squid3.3 Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http_port 8080 | |
hierarchy_stoplist cgi-bin ? | |
acl QUERY urlpath_regex -i cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php | |
acl localnet src 192.168.0.0/16 | |
acl localhost src 127.0.0.1/32 | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 | |
acl Safe_ports port 21 | |
acl Safe_ports port 443 | |
acl Safe_ports port 70 | |
acl Safe_ports port 210 | |
acl Safe_ports port 1025-65535 | |
acl Safe_ports port 280 | |
acl Safe_ports port 488 | |
acl Safe_ports port 591 | |
acl Safe_ports port 777 | |
acl purge method PURGE | |
acl connect method CONNECT | |
http_access deny !Safe_ports | |
http_access deny CONNECT !SSL_ports | |
http_access allow localhost manager | |
http_access deny manager | |
http_access allow localnet | |
http_access allow localhost | |
http_access deny all | |
# Cache Config | |
cache_mem 1024 MB | |
maximum_object_size_in_memory 20 MB | |
memory_replacement_policy heap GDSF | |
cache_replacement_policy heap LFUDA | |
cache_dir aufs /var/spool/squid3 409600 16 256 | |
minimum_object_size 0 | |
maximum_object_size 5120 MB | |
coredump_dir /var/spool/squid3 | |
cache_swap_low 87 | |
cache_swap_high 90 | |
# Logging | |
access_log /var/log/squid3/access.log | |
cache_log /var/log/squid3/cache.log | |
cache_store_log none | |
logfile_rotate 7 | |
debug_options ALL,1 22,5 | |
# Don't cache 404's | |
negative_ttl 0 | |
# Cache Options: (1 year = 525600 mins, 1 month = 20160 mins, 1 day = 1440) | |
refresh_pattern ^ftp: 1440 20% 10080 | |
refresh_pattern ^gopher: 1440 0% 1440 | |
refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 1440 90% 525600 override-expire override-lastmod ignore-reload ignore-no-cache | |
refresh_pattern -i \.(iso|avi|wav|mp3|mp4|mpeg|swf|flv|x-flv)$ 20160 100% 525600 override-expire override-lastmod ignore-reload | |
refresh_pattern -i \.(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|tiff)$ 525600 100% 525600 override-expire override-lastmod ignore-reload | |
refresh_pattern -i \.index.(html|htm)$ 0 40% 20160 | |
refresh_pattern -i \.(html|htm|css|js)$ 0 40% 20160 | |
refresh_pattern . 1440 40% 20160 | |
quick_abort_min -1 QB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment