Logging messages in web server log format
When we use Squid in reverse proxy mode, most of our web server log messages will go missing as the requests which can be satisfied from Squid's cache will never make it to the web server. So, Squid's access log will be our source of web server logs now. However, the problem is that, by default Squid's access log format is completely different to the log format used by most web servers. To get rid of this problem, we can use the common
log format with the access_log
directive and this will allow Squid to start logging messages in the Apache web server log format.
Ignoring the browser reloads
Most browsers have a reload button, which if used, sets the Cache-Control
HTTP header to no-cache
. This will force Squid to purge the cached content and fetch it from the origin server even if the content in the cache was still valid, which results in a waste of resources.