Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Custom forced 503 page does not work (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>