Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been using w3 Total Cache with the setting to enable Expires Headers and eTags but they are not being set.

I'm serving images and other media from a sub-domain such as static.example.org served by nginx but it didn't work even when I was serving these files with Apache from the main domain.

I've tried disabling and re-enabling the browser caching settings in the admin without success. What do you suggest?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

do you have mod_expires installed and enabled in your apache module?

share|improve this answer
    
I think actually my setup is so barebones that I cannot even have a .htaccess of sorts. I'll have to put everything back on the same subdomain and make sure mod_expires is turned on. –  L. De Leo Nov 5 '10 at 16:12
add comment

If you are using Nginx to serve static content then you will need to manually add your expires headers to your Nginx server file.

Example:

location ~* \.(jpg|png|gif|jpeg|css|js|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {

                        expires 7776000;

                }
share|improve this answer
    
Should there not be a "s" after the number? It also seems that Nginx already can create the Nginx.conf file for you, but I still get the F for Expire Header Browser Cache settings: pastebin.com/UeW9sGjX –  rhand Dec 23 '12 at 5:09
add comment

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.