Welcome! Log In Create A New Profile

Advanced

Re: Nginx as reverse proxy to Hudson-Logout issue.

September 07, 2010 04:28AM
On Tue, Sep 07, 2010 at 12:21:37PM +0400, Igor Sysoev wrote:

> On Tue, Sep 07, 2010 at 03:54:55AM -0400, mogaroy wrote:
>
> > Fixed it for IE as well with this:
> >
> > [b]add_header Cache-Control "no-cache";[/b]
>
> Yes, this is right way.
>
> However, this configuration is wrong:
>
> location / {
> root /var/www;
> include cache-control.conf;
> index index.html index.htm;
> }
>
> cache-control.conf:
>
> # default cache 1 day
> expires +1d;
>
> if ($request_uri ~* "^/services/.*$") {
> expires +0d;
> add_header Pragma "no-cache";
> }
>
> if ($request_uri ~* "^/(index.html)?$") {
> expires +1h;
> }
>
> It may work in some case and may not work in others.
> It should be rewritten as:
>
> root /var/www;
> index index.html index.htm;
>
> location = / {
> expires +1h;
> }
>
> location = /index.html {
> expires +1h;
> }
>
> location / {
> index index.html index.htm;
> expires +1d;
> }
>
> location /services/ {
> index index.html index.htm;
> expires -1;
> }

Indecies in locations are not needed since they are inherited from
the server level:

root /var/www;
index index.html index.htm;

location = / {
expires +1h;
}

location = /index.html {
expires +1h;
}

location / {
expires +1d;
}

location /services/ {
expires -1;
}


--
Igor Sysoev
http://sysoev.ru/en/

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

Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 01, 2010 01:45AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 07, 2010 01:54AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

Igor Sysoev September 07, 2010 02:04AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 07, 2010 02:40AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

mogaroy September 07, 2010 03:54AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

Igor Sysoev September 07, 2010 04:26AM

Re: Nginx as reverse proxy to Hudson-Logout issue.

Igor Sysoev September 07, 2010 04:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 207
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