How to allow only specific URL's in maintenance mode?

shrinath.m nginx-forum at nginx.us
Mon Dec 12 05:49:14 UTC 2011


My maintenance mode config is as follows : 


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

error_page 503 @maintenance;

location @maintenance 
{
    rewrite ^(.*)$ /maintenance.html break;
    proxy_method GET;
    proxy_pass http://localhost:100;
}


What it is doing is rewriting all the url to /maintenance.html if that
file is present. 
Now I want to allow only a few url's - they have to be accessible during
maintenance mode too.

Can we achieve that?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,219896,219896#msg-219896



More information about the nginx mailing list