Maintenance mode for all but my ip

Ian Evans ianevans at digitalhit.com
Sat Dec 7 13:33:03 UTC 2013


Getting ready to convert the site to UTF-8 (finally!) and wanted to 
know how I could issue error code 503 to all people and bots but still 
allow my IP in so I can go 'round the site checking for glitches due to 
the change.

Right now I have this implementation for 503's but that issues the 
error code for everyone including me. I know about allow/deny but I'm 
not sure how it fits into this mechanism.

if (-f $document_root/maintenance.html) {
return 503;
}

error_page 503 @503;
location @503 {
rewrite ^(.*)$ /maintenance.html break;
}



More information about the nginx mailing list