nginx to nginx proxy header problem.

Jauder Ho lists at ruby-forum.com
Fri Mar 6 08:12:55 MSK 2009


I have nginx proxying to nginx+fcgi and it looks like the Vary header is
being set twice. The reason for this config is that I intend to stick a
Varnish instance in between but wanted to make sure this was working
before.

Both instances have pretty much the same config.

>From the frontend instance:
curl -I http://shop.carumba.org
HTTP/1.1 200 OK
Server: Hai
Date: Fri, 06 Mar 2009 05:02:38 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
Vary: Accept-Encoding
Set-Cookie: frontend=a5c6d3165679d1abdbc173205f2239da; expires=Fri, 06
Mar 2009 06:02:38 GMT; path=/; domain=shop.carumba.org; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache


>From the backend instance:
HTTP/1.1 200 OK
Server: Hai
Date: Fri, 06 Mar 2009 05:02:56 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
Set-Cookie: frontend=9e9f8cb77126971bb0798fa7324bda30; expires=Fri, 06
Mar 2009 06:02:55 GMT; path=/; domain=shop.carumba.org; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache


As you can see, there is an additional Vary: header for some odd reason.



For completeness, the following are responses for a static file.
a001:/usr/local/nginx/conf/carumba$ curl -I --compressed
http://shop.carumba.org/skin/frontend/default/blank/css/reset.css
HTTP/1.1 200 OK
Server: Hai
Date: Fri, 06 Mar 2009 05:10:36 GMT
Content-Type: text/css
Last-Modified: Wed, 18 Feb 2009 07:22:32 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Content-Encoding: gzip

a001:/usr/local/nginx/conf/carumba$ curl -I
http://shop.carumba.org/skin/frontend/default/blank/css/reset.css
HTTP/1.1 200 OK
Server: Hai
Date: Fri, 06 Mar 2009 05:10:49 GMT
Content-Type: text/css
Content-Length: 2834
Last-Modified: Wed, 18 Feb 2009 07:22:32 GMT
Connection: keep-alive
Vary: Accept-Encoding
Expires: Thu, 31 Dec 2037 23:55:55 GMT
Cache-Control: max-age=315360000
Accept-Ranges: bytes


This is with nginx 0.7.38
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list