Welcome! Log In Create A New Profile

Advanced

Re: hi, is there a way to use nginx to publish the maintenance file

Maxim Dounin
April 07, 2011 06:52AM
Hello!

On Thu, Apr 07, 2011 at 06:41:05PM +0800, Space Lee wrote:

> Hi, a strange thing, I found try_files won't work in the server context, only work in the location context.
>
> I have a sample like this
> try_files /maintenance.html $uri $uri/
> location / {
> XXXX
> }
>
> then it won't work, but if I move the try_files into the location
>
> location / {
> try_files /maintenance.html $uri $uri/
> XXXX
> }
>
> then it works for root directory.

Yes, this is expected behaviour. Directive "try_files" isn't
inherited and only make sense at server level if there is no
matching location (that is, if implicit server location used to
process request).

Maxim Dounin

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

hi, is there a way to use nginx to publish the maintenance file

fjctlzy March 23, 2011 11:36AM

Re: hi, is there a way to use nginx to publish the maintenance file

vt March 23, 2011 11:40AM

Re: hi, is there a way to use nginx to publish the maintenance file

fjctlzy April 07, 2011 04:14AM

Re: hi, is there a way to use nginx to publish the maintenance file

Pascal Nitsche April 07, 2011 04:18AM

Re: hi, is there a way to use nginx to publish the maintenance file

fjctlzy April 07, 2011 04:22AM

Re: hi, is there a way to use nginx to publish the maintenance file

Pascal Nitsche April 07, 2011 04:36AM

Re: hi, is there a way to use nginx to publish the maintenance file

fjctlzy April 07, 2011 06:42AM

Re: hi, is there a way to use nginx to publish the maintenance file

Maxim Dounin April 07, 2011 06:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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