Location problems

Igor Clark igor at pokelondon.com
Mon Mar 3 17:07:41 MSK 2008


Hi Igor,

I've been trying this out taking the approach of the example you gave  
me - very happy about it, and have a couple of questions.

-  Using "error_page 404 @fallback" instead of "if (! -f " seems to  
generate 404 errors in the log for every hit transferred to the  
@fallback. Is that inevitable?

- Is there any way to use "fastcgi_intercept_errors on" with this setup?

Thanks very much,
Igor

On 1 Mar 2008, at 07:47, Igor Sysoev wrote:

> On Fri, Feb 29, 2008 at 11:20:42PM -0800, Cliff Wells wrote:
>
>>
>> On Fri, 2008-02-29 at 14:31 +0300, Igor Sysoev wrote:
>>
>>>        location / {
>>>            error_page  404 = @fallback;
>>>        }
>>>
>>>        location @fallback {
>>>            fastcgi_pass   ...
>>>            fastcgi_param  SCRIPT_FILENAME  /path/to/frontend.php;
>>>            fastcgi_param  QUERY_STRING     control_path=$uri;
>>>            ...
>>>        }
>>
>> Igor,
>>
>> I've seen you use the "@" prefix on locations in several examples  
>> you've
>> given people.  Is this just a notation you prefer or does it have  
>> some
>> significance?
>
> Yes, these are named locaitons, they had appeared in 0.6.6 and 0.5.31.
> The main feature - while internal redirect via error_page $uri is not
> changed, so they are handily to use in fallback handlers.
>
> The named locaiton are always internal and do not intersect with  
> site's URI
> space.
>
> In 0.6.27 post_action will support named location too.
>
>
> -- 
> Igor Sysoev
> http://sysoev.ru/en/
>

--
Igor Clark // POKE // 10 Redchurch Street // E2 7DD // +44 (0)20 7749  
5355 // www.pokelondon.com









More information about the nginx mailing list