Skip to content

Instantly share code, notes, and snippets.

@Ptico
Forked from nordringrayhide/snippets.nginx.conf
Created February 11, 2011 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ptico/822595 to your computer and use it in GitHub Desktop.
Save Ptico/822595 to your computer and use it in GitHub Desktop.
# 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