Created
September 28, 2015 15:24
-
-
Save gabrielcorado/e4d40aca27201986924c to your computer and use it in GitHub Desktop.
NGINX Maintenance
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
server { | |
listen 80; | |
root /www/data/; | |
location / { | |
if (-f $document_root/maintenance.html) { | |
return 503; | |
} | |
} | |
error_page 503 @maintenance; | |
location @maintenance { | |
if ($uri !~ ^/assets/) { | |
rewrite ^(.*)$ /maintenance.html break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment