Location problems

Igor Sysoev is at rambler-co.ru
Fri Feb 29 13:42:18 MSK 2008


On Fri, Feb 29, 2008 at 09:39:20AM +0000, Igor Clark wrote:

> Hi Igor, thank you very much. When I did
> 
> 	location ~^ /admin/
> 
> it still gave a 404, but when I changed it to
> 
> 	location ~^ /admin.php
> 
> it worked perfectly. Seems I've been trying to apply "location" to pre- 
> rewrite URLs, which just won't work - is that right?

Could you write what URIs and how you want to handle, for example:

       /       -> fascgi
       /admin/ -> fascgi, auth protected
      ...

?

> On 28 Feb 2008, at 20:50, Igor Sysoev wrote:
> 
> >On Thu, Feb 28, 2008 at 07:41:34PM +0000, Igor Clark wrote:
> >
> >>I just want to do the following, but still have all the other
> >>directives work, so that rewrites and PHP work under /admin:
> >
> >        fastcgi_index                index.php;
> >        fastcgi_intercept_errors     on;
> >        include                      conf/fastcgi_params;
> >
> >        location ^~ /admin/ {
> >
> >            allow   1.2.3.4;
> >            deny    all;
> >
> >            location ~ \.php$ {
> >                fastcgi_pass         127.0.0.1:9999;
> >            }
> >        }
> >
> >        location ~ \.php$ {
> >            fastcgi_pass             127.0.0.1:9999;
> >        }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list