Created
February 10, 2011 13:23
-
-
Save nordringrayhide/820501 to your computer and use it in GitHub Desktop.
Maintenance mode nginx + capistrano
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
# cap web:deploy:desable & cap web:deploy:enable | |
server { | |
... | |
if (-f $document_root/system/maintenance.html) { set $maintenance 1; } | |
if ($request_uri ~* (jpg|jpeg|gif|js|css)$) { set $maintenance 0; } | |
if ($maintenance) { rewrite ^(.*)$ /system/maintenance.html; break; } | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment