Another auth/location question - probably very simple to fix :)
Igor Sysoev
is at rambler-co.ru
Sun Aug 17 12:06:40 MSD 2008
On Sun, Aug 17, 2008 at 12:50:54AM -0700, mike wrote:
> On 8/17/08, Igor Sysoev <is at rambler-co.ru> wrote:
>
> > The three following configuration do not work without the patch:
> >
> > (yours with regex)
> >
> > location ~ /wordpress/wp-admin {
> > auth
> >
> > location ~ \.php$ {
> > fastcgi
> > }
> > }
> >
> > location ~ \.php$ {
> > fastcgi
> > }
> >
> > (disable regex ^~)
> >
> > location ^~ /wordpress/wp-admin {
> > auth
> >
> > location ~ \.php$ {
> > fastcgi
> > }
> > }
> >
> > location ~ \.php$ {
> > fastcgi
> > }
> >
> > (static locations)
> >
> > location /wordpress/wp-admin {
> > auth
> >
> > location ~ \.php$ {
> > fastcgi
> > }
> > }
> >
> > location ~ \.php$ {
> > fastcgi
> > }
>
> okay, so which out of these is the most efficient method? Maybe our
> language barrier is confusing me but I am not sure which method you
> are recommending or are saying is fixed/not fixed/the proper way...
The more effective is second method (using ^~).
The inclusive patch fixes all threee above configuration.
If you look at configuration schema
location ??? /wordpress/wp-admin {
(1)
location ~ \.php$ {
(2)
}
}
location ~ \.php$ {
(3)
}
then without the patch a request /wordpress/wp-admin/some.php
*) will be handled as (1) if you replace "???" with "^~",
*) will be handled as (3) if you replace "???" with "~",
*) will be handled as (3) if you omit "???" at all.
The patch force to handle the request in (2) always.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list