1

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?

2 Answers 2

3

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

1
  • 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.
    – Lorenzo
    Nov 5, 2010 at 16:12
2

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;

                }
1
  • 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, 2012 at 5:09

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