root not recognized
Mathew Davies
thepixeldeveloper at googlemail.com
Thu Jan 1 05:02:52 MSK 2009
Try using the $document_root variable
rewrite (.*) $document_root/maintenance/index.html;
On Wed, Dec 31, 2008 at 10:56 PM, Sean Allen
<sean at monkeysnatchbanana.com> wrote:
> ok, well better put on root is recognized, a second isnt.
>
> have this setup ( lots of snipping here... )
>
> root /some/path;
> ....
>
> location /
> {
> if ( -f /tmp/.maintenance )
> {
> set $site_maintenance 1;
> }
>
> if ( $site_maintenance )
> {
> root /maintenance/path;
> rewrite (.*) /maintenance/index.html;
> }
> }
>
> problem is... the rewrite works just fine but its trying to serve
>
> /some/path/maintenance/index.html
> instead of
> /maintenance/path/maintenance/index.html
>
> any idea why?
>
>
>
>
More information about the nginx
mailing list