Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have modified the setting in httpd.conf of Apache to be able to use mod_expires but when I load a page, now I have an error 500 (The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.).

In httpd.conf I really have : LoadModule expires_module modules/ without # before.

I use XAMPP on Windows Vista.

Is there something else that require to be activate?

The Apache server give webpages without problem when the .htaccess is empty. But I add the code following, I have the error 500.

<IfModule mod_expires.c>
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0

# Set up caching on media files for 1 year (forever?)
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A604800 #12 hours cache
Header append Cache-Control "public"

Any ideas?

share|improve this question
The contents of your error log could be instructive. – womble Nov 1 '09 at 20:30
.htaccess: ExpiresDefault takes one argument, an expiry date code – Patrick Desjardins Nov 1 '09 at 20:34
up vote 1 down vote accepted

2 things:

1- Cannot add ExpiresDefault A604800 #12 hours cache because the #12 is not a comment... comments seem to be in 1 line.

2- I required to load the LoadModule headers_module modules/ too!

Thanks to point me out about checking the Log womble.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.