Skip to content

Instantly share code, notes, and snippets.

View yanzou's full-sized avatar

yanzou

  • Spirent Communications
  • San Jose
View GitHub Profile
@somebox
somebox / nginx.conf
Created March 13, 2012 16:19
Nginx error page handling
# The following recipe works with upstream rails proxy for custom 404s and 500s.
# Errors are usually handled via rails except if proxy is really down, in which case
# nginx needs a bit more configration.
server {
# ...
location / {
error_page 404 = @rails; # let rails show a page with suggestions
try_files maintenance.html @rails;