Apache 2.2 on RedHat 6.3. I have a virtual host that is setup like so:
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin some@email.com
DocumentRoot /home/xxxxx/Sites/xxxxxxx.com/htdocs
ServerName xxxxxxx.com
ServerAlias xxxxxxxx.com
SuexecUserGroup xxxx xxxx
suPHP_UserGroup xxxx xxxx
## a cache hit will log -, while a cache miss will log 1.
SetEnv CACHE_MISS 1
LogFormat "%h %l %u %t \"%r\" %>s %b %{CACHE_MISS}e" common-cache
CustomLog /var/log/cache.log common-cache
<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>
<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheRoot "/var/www/cache"
CacheDefaultExpire 3600
CacheIgnoreCacheControl On
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 1000000
</IfModule>
</IfModule>
# support perl + cgi
ScriptAlias /cgi-bin/ /home/ls414-100/Sites/xxxx.com/htdocs/cgi-bin/
<Directory /home/xxxx/Sites/xxxxx.com/htdocs/cgi-bin/>
Options ExecCGI -Indexes -MultiViews
AddHandler cgi-script cgi pl
</Directory>
</VirtualHost>
But it will not log cache hits.
[25/Sep/2013:15:24:22 -0400] "GET /icons/stuff5.jpg HTTP/1.1" 304 - 1
Please notice the '1' at the end, it means it didn't cache.
Any help will be greatly appreciated.