Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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/mod_expires.so 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"
</FilesMatch>
</IfModule>

Any ideas?

share|improve this question
1  
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

1 Answer 1

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/mod_headers.so too!

Thanks to point me out about checking the Log womble.

share|improve this answer

Your Answer

 
discard

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.