root not recognized
Sean Allen
sean at monkeysnatchbanana.com
Thu Jan 1 17:49:45 MSK 2009
That doesn't work.
I get a 404 for that.
On Dec 31, 2008, at 9:02 PM, Mathew Davies wrote:
> 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