Forum Moderators: phranque
1. My server environment is REDHAT Enterprise 3 i686 on standard - WHM X v3.1.0 + Apache 2.2.6 + PHP 5.2.5 .
2. I've installed modules including mod_cache, mod_disk_cache, mod_mem_cache and mod_expires.
mod_cache related settings£º
CacheRoot /home/apachecache
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheDefaultExpire 86400
CacheMaxExpire 86400
3. I add the following lines in the test php page to make apache cache the result:
<?php
header("Expires: " . gmdate('D, d M Y H:i:s', time()+3600*72) ." MT" );
header("Last-Modified: ".gmdate('D, d M Y H:i:s') . ' GMT');
header("Cache-Control: public,max-age=604800");
?>
4. I also add the following lines to the test page so that I can tell whether it is read from cache:
<?php
echo date("H:i:s");
?>
After the above settings, I can see cache files are created but the page itself is always 'fresh' . Anybody here can help me? Thanks!