Skip to content

Instantly share code, notes, and snippets.

@sharifulin
Created March 29, 2010 13:02
Show Gist options
  • Save sharifulin/347812 to your computer and use it in GitHub Desktop.
Save sharifulin/347812 to your computer and use it in GitHub Desktop.
nginx.conf error
# error
proxy_intercept_errors on;
proxy_ignore_client_abort on;
recursive_error_pages on;
error_page 400 403 404 /404.html;
error_page 500 502 503 504 512 =200 /500.html;
location ~* /(404|500).html {
internal;
root /path/to/error;
}
#
location / {
access_log /path/to/log/nginx.log main;
proxy_pass http://127.0.0.1:6000;
proxy_redirect http://127.0.0.1:6000 http://$host;
proxy_set_header X-Real-IP $remote_addr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment