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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs