Answer the question
In order to leave comments, you need to log in
Nginx: Last-Modified in the Future
Now on my watch 23:50 Moscow time, October 12th. About an hour ago (at 22:58 Moscow time or 18:58 GMT) I posted an updated version of the site for production. When requesting a static file with the css extension from the server, Nginx receives the following headers:
HTTP/1.1 200 OK
Server: nginx/1.4.2
Date: Sat, 12 Oct 2013 18:58:05 GMT
Content-Type: application/x-javascript
Content-Length: 131157
Last-Modified: Sat, 12 Oct 2013 22:09:50 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "5259c8ae-20055"
Expires: Sat, 12 Oct 2013 19:28:05 GMT
Cache-Control: max-age=1800
Accept-Ranges: bytes
Access: 2013-10-12 14:13:26.000000000 -0400
Modify: 2013-10-12 18:09:54.000000000 -0400
Change: 2013-10-12 14:13:26.000000000 -0400
location ~* \.(jpg|png|gif|jpeg|css|js|doc|pdf|xls|docx|xlsx|odt|odc|ico)$ {
root /var/lib/tomcat7/webapps/ROOT;
proxy_buffering on;
proxy_buffers 8 8k;
proxy_cache static;
proxy_cache_min_uses 1;
proxy_cache_use_stale error timeout invalid_header http_500 http_502 http_503 http_504 updating;
proxy_cache_valid 200 301 302 304 30m;
expires 30m;
}
Answer the question
In order to leave comments, you need to log in
The problem with Expires was solved by disabling all proxy directives and setting expires: modified +30m;
and on the web server (s) with dates and time zones everything is in order?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question