Welcome! Log In Create A New Profile

Advanced

Re: nginx as load balancer + apache as a web server issue

Ryan Malayter
August 11, 2010 05:56PM
On Tue, Aug 10, 2010 at 8:17 PM, josesan311 <nginx-forum@nginx.us> wrote:
> Hey guys,
>
> I have just found and fixed the issue, it was related to the following
> settings, commenting them solved the ie8 issue,
>
> #  client_body_timeout   60;
> #  client_header_timeout 60;
> #  expires               24h;
> #  keepalive_timeout     60 60;
> #  send_timeout          60;
>
> Any advice why this would happen?

The "expires 24h" is probably telling nginx to add a cache-control
header to everything in that location. So the browser was caching the
old page that didn't have the item removed from the cart, and showing
that. (I am assuming your "expires" was set at a high level in nginx
configuration, maybe at the server level?)

Typically, in most applications, dynamic pages should expire
immediately, and static items (images, CSS, JS, etc.) should have
longer expiration times sent to the browser. (There are exceptions, of
course... think of an RSS feed. You might want it to be cached for 15
minutes, even though it is a dymic page.)

You can make separate locations in nginx to fix this (one for statics,
the other for dynamics). Use a regex-based location if all the dynamic
stuff isn't under one path.

--
RPM

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

nginx as load balancer + apache as a web server issue

josesan311 August 10, 2010 03:24AM

Re: nginx as load balancer + apache as a web server issue

JG August 10, 2010 03:40AM

Re: nginx as load balancer + apache as a web server issue

josesan311 August 10, 2010 02:46PM

Re: nginx as load balancer + apache as a web server issue

josesan311 August 10, 2010 05:55PM

Re: nginx as load balancer + apache as a web server issue

Reinis Rozitis August 10, 2010 03:26PM

Re: nginx as load balancer + apache as a web server issue

josesan311 August 10, 2010 06:11PM

Re: nginx as load balancer + apache as a web server issue

josesan311 August 10, 2010 09:17PM

Re: nginx as load balancer + apache as a web server issue

Ryan Malayter August 11, 2010 05:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 45
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready