Welcome! Log In Create A New Profile

Advanced

Re: Reverse Proxy Cache Setup

Ryan Malayter
March 30, 2010 11:10PM
On Mon, Mar 29, 2010 at 1:29 PM, royo <nginx-forum@nginx.us> wrote:
> The app sets "Cache-Control: private" right now for everyone,
> and with the following setup even users that are not logged in
> receive a fresh copy of the page every time. The said cookie
> is set when logging in to the domain xyz.com(not actual
> domain) as well as other cookies but when using the nginx
> proxy only the other cookies are set and the logmein cookie
> isn't visible.

If nginx can see one cookie for /, it should see them all unless it is
scoped improperly. Have you used fiddler or Firebug to be sure that
the cookie isn't ebing set and passed?

Secondly, if the back-end is setting Cache-Control: private, then
nginx will obey and not cache anything. Changing the back-end to set
"Cache-Control: public,max-age=3600" or whatever is the easiest route.

If you can't do that, you can do something like this with "if" and
rewrite, to a location that does not use the cache at all for logged
in user requests. $http_cookie_logmein should be accessible for such
requests, you can echo it back for debuggin using:

add_header "X-Logmein-Received" $http_cookie_logmein

Once again, debugging with Fiddler or Firebug will let you see these
headers and work out the kinks.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Reverse Proxy Cache Setup

royo March 29, 2010 09:41AM

Re: Reverse Proxy Cache Setup

Ryan Malayter March 29, 2010 11:50AM

Re: Reverse Proxy Cache Setup

royo March 29, 2010 12:44PM

Re: Reverse Proxy Cache Setup

Ryan Malayter March 29, 2010 01:10PM

Re: Reverse Proxy Cache Setup

royo March 29, 2010 01:19PM

Re: Reverse Proxy Cache Setup

Ryan Malayter March 30, 2010 11:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 197
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready