Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I verify Apache caching is working?

I've added the cache directives to my httpd.conf file but cannot discover how to verify it's actually caching the pages and serving them up. How can I verify this?

I added the cache directives at the server config level (not using VirtualHost) as:

CacheEnable disk /
CacheRoot /var/cache
CacheDefaultExpire 3600
like image 820
Don Rhummy Avatar asked Jan 28 '14 18:01

Don Rhummy


People also ask

What is Apache caching?

The most basic form of caching present in Apache is the file-handle caching provided by mod_file_cache . Rather than caching file-contents, this cache maintains a table of open file descriptors. Files to be cached in this manner are specified in the configuration file using the CacheFile directive.

How do I test Apache server?

To test that an Apache HTTP server is working: From the local system, direct a browser on the local system to http://localhost . From a remote system, direct a browser to http:// followed by the value of the ServerName directive specified in the configuration file ( /etc/httpd/conf/httpd. conf ).


1 Answers

If you add \"%{cache-status}e\" to your LogFormat line it will show up in your access log file.

like image 182
wowbagger Avatar answered Oct 15 '22 23:10

wowbagger