PDA

View Full Version : Mod_expires not working


TheBlueblib
06-12-2009, 06:31 AM
I've loaded both mod_expires and mod_headers into my apache2 configuration, and when I run phpinfo() it tells me mod_expires and mod_headers are both loaded. I didn't have this issue when I ran mod_rewrite.

This is the code I'm using in my .htaccess:
ExpiresActive on
ExpiresDefault "access plus 1 days"

Before I loaded mod_expires I got an Internal Server Error, but after I loaded the module the site ran fine (but with expires headers still set to 1982). This must mean that the configuration is at least reading the code properly but not doing anything about it.

EDIT: One thing that might be causing this is that I haven't done any recompile of any sort, how can you recompile your apache installation and check if mod_expires is properly enabled? (even though phpinfo() told me it was loaded).

schleppel
06-16-2009, 11:28 PM
Is the server's clock set correctly? (It probably is but still check if you haven't.)
Does it get set to 1984 if you use "access plus 2 years"?
What happens with mod_expires off?
What happens if you use "modification plus 2 days"?