if ,-f and variables

Roxis roxis at list.ru
Wed Feb 27 19:42:50 MSK 2008


On Wednesday 27 February 2008, Sean Allen wrote:
> this works:
>
> if ( -f /ah/sites/colon365.co.uk/public/.maintenance )
> {
>    set $maintenance 1;
> }
>
> this doesn't:
>
> if ( -f $document_root/.maintenance )
> {
>    set $maintenance 1;
> }
>
> two questions,
>
> 1. is there a way to make the latter work? some slight change or tweak?
> 2. why doesn't it work? are variables not interpolated when doing file
> system checks like -f?

it should work.
probably you have wrong root or root in wrong place.
plz provide full config





More information about the nginx mailing list