proxy_ignore_headers doesn't seem to work

piotr nginx-forum at
Wed Dec 14 16:34:15 UTC 2011


I've problem similar as in this thread: 

nginx is ignoring my proxy_cache_valid value, using instead expire time
specified by upstream server.  

  proxy_ignore_headers X-Accel-Expires Expires Cache-Control
  proxy_cache_valid 200 302 30h;
  proxy_cache_valid any 1h;

headers from file stored on cache:
HTTP/1.0 200 OK
Expires: Wed, 14 Dec 2011 16:33:27 GMT
Last-Modified: Tue, 13 Dec 2011 06:16:41 GMT
Cache-Control: max-age=600
Content-Type: image/jpeg
Content-Length: 27946
Server: Mapnik2/0.8.0
Date: Wed, 14 Dec 2011 16:23:27 GMT
Connection: close

from logs:
14/Dec/2011:10:02:11 -0600 HIT Cache-Control:max-age=600 Expires:Wed, 14
Dec 2011 16:09:55 GMT upstream_server:- upstream_status:- (...)
14/Dec/2011:10:22:55 -0600 MISS Cache-Control:max-age=600 Expires:Wed,
14 Dec 2011 16:32:55 GMT upstream_server(...)

I've tried to add also Date and Last-Modified to proxy_ignore_headers,
adding same headers to proxy_hide_header, but without any luck.

nginx/0.8.54 from source on RHEL5.7, and nginx/1.0.10 from official deb
package on Ubuntu10.04. 

Does anybody have any idea what could be wrong?



Posted at Nginx Forum:,220058,220058#msg-220058

More information about the nginx mailing list