Welcome! Log In Create A New Profile

Advanced

Re: Internal marked 503 error page returns default 404

ryd994
August 24, 2015 10:40PM
Hi Adam,

Why not use @named location directly?

error_page 503 @unavailable;
location @unavailable {
alias /absolute/path/to/file;
}


Notice the path is not related to document root.


On Tue, Aug 25, 2015, 05:33 Joó Ádám <adam@jooadam.hu> wrote:

Hi Francis,

Thank you for your response. After some further reading I think now I
get the processing cycle. I would rather not create a separate root
for one file, so I settled with the following:

location = /unavailable.html {
return 503;
}

location @unavailable {
try_files /unavailable.html =500;
}

try_files $uri =503;

error_page 503 @unavailable;

Thanks,
Ádám

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

Internal marked 503 error page returns default 404

Ádám Joó August 21, 2015 10:32PM

Re: Internal marked 503 error page returns default 404

Francis Daly August 22, 2015 07:56PM

Re: Internal marked 503 error page returns default 404

Joó Ádám August 24, 2015 05:34PM

Re: Internal marked 503 error page returns default 404

ryd994 August 24, 2015 10:40PM

Re: Internal marked 503 error page returns default 404

Francis Daly August 25, 2015 06:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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