Expires .. is there a way to set an expires header for all of jpg, gif, css, js ?

David mishy.cth at gmail.com
Sat Sep 6 21:10:52 MSD 2008

You're absolutely right.

When using:

location ~* ^.+\.(jpg|jpeg|gif|png)$ {
        access_log   off;
        expires      30d;

It ignores my:

        location / {
                index   index.php index.html index.htm;
                root    /home/user/public_html;

and tries to load the image from /usr/local/nginx/html

More information about the nginx mailing list