Welcome! Log In Create A New Profile

Advanced

Custom forced 503 page does not work

Dennis Jacobfeuerborn
July 25, 2013 09:06AM
Hi,
I'm trying to deliver a custom 503 page for all requests the server
receives but with the following config it doesn't work.

server {
listen 81;
server_name localhost;
error_log /var/log/nginx/error.log debug;

root /usr/share/nginx/html;

location / {
return 503;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

I get a 503 response but the 50x.html page is not used even though it is
present in /usr/share/nginx/html/50x.html. I see no error in the error
log even in debug mode.
What is wrong with this config?

Regards,
Dennis

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

Custom forced 503 page does not work

Dennis Jacobfeuerborn July 25, 2013 09:06AM

Re: Custom forced 503 page does not work

skchopperguy July 31, 2013 02:51AM

Re: Custom forced 503 page does not work

Maxim Dounin July 31, 2013 04:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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