Skip to content

Instantly share code, notes, and snippets.

@danalloway
Created February 16, 2016 16:50
Show Gist options
  • Save danalloway/788398e49ec313a99046 to your computer and use it in GitHub Desktop.
Save danalloway/788398e49ec313a99046 to your computer and use it in GitHub Desktop.
Custom NGINX 503 Page
server {
server_name _;
# override how 503's should be handled
error_page 503 @503;
location @503 {
# attempt to server our custom 503 first
# then fall back to the built-in one
try_files /503.html =503;
}
#location /make/this/path/503 {
# return 503;
#}
# or, 503 everything
#return 503;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment