I have wordpress installed. To make it a bit faster, I've created a few "static-only symbolic-link" apps so that Nginx is used to retrieve images/css/js instead of apache. Now that I have this working, I've realized that no HTTP headers that enable browser caching of the images/css/js are being sent by Nginx. As a result, the files are being re-retrieved by website visitors on every page view. How can I get Nginx to send an "expires" header, even if it's just 1 hour? Thanks asked 08 Mar '13, 23:55 turgs |
Expires headers are not available from "Symbolic link to static-only app" applications. Instead, you should create a "Symbolic link to static/cgi/php54 app" application, and then use a .htaccess file containing the following directives:
answered 09 Mar '13, 09:52 likebike Thanks for your suggestion. The Wordpress site is already a "static/cgi/php54 app", so I think I can do this already without creating a sympolic link. The point is I want to use the power of Nginx to deliver the static files, but with browser caching too.
(09 Mar '13, 18:40)
turgs
|
Another way to do this would be:
answered 09 Mar '13, 14:38 seanf This is very interesting. I'll try this and let you know.
(09 Mar '13, 18:41)
turgs
|