Skip to content

Instantly share code, notes, and snippets.

@nossila
Created January 17, 2013 16:06
Show Gist options
  • Save nossila/4557047 to your computer and use it in GitHub Desktop.
Save nossila/4557047 to your computer and use it in GitHub Desktop.
This gist shows how to setup a custom error_page on nginx when using a simple upstream server
server {
location / {
proxy_pass http://upstreamserver;
# or
# try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/error-pages/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment