Created
December 31, 2012 19:11
-
-
Save anonymous/4422059 to your computer and use it in GitHub Desktop.
This is my version of rails maintenance page config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
location @app { | |
# ... | |
if (-f $document_root/system/maintenance.html) { | |
return 503; | |
} | |
# proxy_pass ... | |
} | |
error_page 503 @503; | |
location @503 { | |
# intercept 405's so we capture POSTs | |
error_page 405 = /system/maintenance.html; | |
# only use maintenance if it's there | |
if (-f $document_root/system/maintenance.html) { | |
rewrite ^(.*)$ /system/maintenance.html break; | |
} | |
# else use the regular 500 | |
rewrite ^(.*)$ /500.html break; | |
} | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment