Welcome! Log In Create A New Profile

Advanced

Re: Correct way to setup maintenance page in nginx

Valentin V. Bartenev
November 03, 2011 05:44PM
On Friday 04 November 2011 01:02:11 António P. P. Almeida wrote:
> Why not this?
>
> root /var/www;
>
> location / {
>
> error_page 503 @unavailable;
>
> location @unavailable {
> try_files /during_building.html @503;
> }
> }
>
> location @503 {
> return 503;
> }
>
> No need to use the if and the internal is implicit on the try_files.

First of all, named locations can be on the server level only.

And, how does a request get into @unavailable? Only after 503 has occurred.
But, what will cause it?

I think the main idea was: when we need to do some maintenance, we just create
a specific file (probably with explaining message for users) and Nginx starts
to return 503 on every request.

wbr, Valentin V. Bartenev

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

Correct way to setup maintenance page in nginx

Quintin Par November 03, 2011 02:32PM

Re: Correct way to setup maintenance page in nginx

Valentin V. Bartenev November 03, 2011 04:20PM

Re: Correct way to setup maintenance page in nginx

António P. P. Almeida November 03, 2011 05:04PM

Re: Correct way to setup maintenance page in nginx

Valentin V. Bartenev November 03, 2011 05:44PM

Re: Correct way to setup maintenance page in nginx

Alexandr Gomoliako November 03, 2011 05:56PM

Re: Correct way to setup maintenance page in nginx

Valentin V. Bartenev November 03, 2011 06:08PM

Re: Correct way to setup maintenance page in nginx

Quintin Par November 03, 2011 11:16PM

Re: Correct way to setup maintenance page in nginx

Quintin Par November 04, 2011 04:58AM

Re: Correct way to setup maintenance page in nginx

Valentin V. Bartenev November 04, 2011 05:50AM

Re: Correct way to setup maintenance page in nginx

Quintin Par November 04, 2011 05:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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