Squid on 18.04 server won't cache anything and the majority is tcp_tunnel/200 when I tail the access log and the cache log shows that nothing is cached. How can I get it to cache websites?
Squid Config:
http_port 3128
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
acl localnet src 192.168.0.0/24
acl localhost src 127.0.0.1
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 CONNECT method CONNECT
acl url dstdomain "/etc/squid/url"
acl key url_regex -i "/etc/squid/key"
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny url
http_access deny key
cache_mem 1024 MB
maximum_object_size_in_memory 100 MB
cache_replacement_policy heap GDSF
cache_dir ufs /etc/squid/cache 5120 16 256
maximum_object_size 100 MB
cache_swap_low 85
cache_swap_high 90
access_log /var/log/squid/access.log
half_closed_clients off
hosts_file /etc/hosts
memory_pools off
client_db off
coredump_dir /var/spool/squid
sed 's/#.*//;s/^\s*$//;/^$/d' /etc/squid/squid.conf
to make the output easier to parse.# cache_log /var/log/squid/cache.log
and tail it while you restart. The logging is a bit counter-intuitive, since the 'cache' log is where squid errors go, and 'access' log is the "usual operations" log, ie: where requests go in and out.tail /var/log/squid/cache.log
if you see any errors that you don't understand you can add them to this post.