Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Squid caching problem

    Hello. I recently set up a squid proxy on a machine in a local network. The entire local network passes through the company's gateway proxy to access non-internal sites. I am able to access all sites, internal and external, by setting the cache_peer to this gateway proxy for external requests and direct connections for all internal requests.
    However, Squid does not seem to be caching anything. Files are being saved into the directory (/usr/local/squid/var/cache/) but a squid analyzer (Squid-Log-Analyzer) says that nothing has been cached.

    Any ideas?

    Here is my configuration file:
    http_port 3128
    cache_peer mycompanyproxy parent 911 0
    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 8 MB
    maximum_object_size 4096 KB
    cache_dir ufs /usr/local/squid/var/cache 100 16 256
    access_log /usr/local/squid/var/logs/access.log squid
    cache_log /usr/local/squid/var/logs/cache.log
    pid_filename /usr/local/squid/var/logs/
    refresh_pattern ^ftp: 1440 20% 10080
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern . 0 20% 4320
    acl allowed_hosts src
    acl all src
    acl manager proto cache_object
    acl localhost src
    acl to_localhost dst
    acl SSL_ports port 443
    acl CONNECT method CONNECT
    acl internal dstdomain
    http_access allow manager localhost
    http_access deny manager
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access allow allowed_hosts
    http_access deny all
    http_reply_access allow all
    icp_access allow all
    always_direct allow internal
    coredump_dir /usr/local/squid/var/cache


  2. #2
    Can you post your access.log file?
    Should be in /usr/local/squid/var/logs/

  3. #3
    Thanks for your help, but I figured out my mistake. I was making my url requests from curl, which defaults to force no caching. I fixed this by adding my own header using the -H option.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts