3)在squid.conf文件里修改配置:
vi /usr/local/squid/etc/squid.conf
增加和修改的部分:
http_port 80 accel vhost
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 1024 MB
cache_dir ufs /export/home/squid/cache 4000 16 256
access_log /export/home/squid/logs/access.log squid
cache_log /export/home/squid/logs/cache.log
cache_store_log /export/home/squid/logs/store.log
pid_filename /export/home/squid/logs/squid.pid
cache_dns_program /usr/local/squid/libexec/dnsserver
dns_children 10
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern .jsp 0 20% 0
文章来源于领测软件测试网 https://www.ltesting.net/