1
vote
1answer
107 views

Serving a file with an expires header depending on when it was last modified

In nginx is there a way to conditionally serve a file with different expires headers depending on when the file was last modified? For example, if foo was modified within the last week then I want it ...
0
votes
2answers
94 views

Set “expires” in nginx for multiple vhosts

I use the "apache style" nginx config (include /sites-enabled folder files and a single .conf for every website I host). How can I set this: location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { expires 30d; ...
2
votes
2answers
306 views

Requesting better explanation for expires headers

I have successfully implemented expires headers however, for several days I have been stumped by one thing. This article: ...
3
votes
1answer
1k views

Nginx reverse proxy: Not setting expires header

I have my static assets configured as location @upstream { proxy_pass http://localhost:82; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; ...
0
votes
1answer
1k views

setting Expires date in iis6

i try to control my iis6 caching i was able to set Cache-Control public, max-age=1000000 but i can't set the Expires any help?
1
vote
1answer
4k views

Can someone share their Varnish VCL to set expires in the future?

It seems that a dozen pages exist that tell you how to set your "expires" headers for files, but none that are actually correct. Right now, my VCL is: if (req.url ~ "^/media/") { set beresp.ttl ...
25
votes
5answers
28k views

Setting expires headers for static content served from nginx

I'm using nginx to server my static content, is there a way that I can set the expires headers for every file that meets a specific rule? For example can I set the expires header for all files that ...