Another auth/location question - probably very simple to fix :)

mike mike503 at gmail.com
Sat Aug 16 12:03:35 MSD 2008


sorry i -did- have it before the location block, i also tried it
after. both work the same

On 8/16/08, mike <mike503 at gmail.com> wrote:
> On 8/16/08, Igor Sysoev <is at rambler-co.ru> wrote:
>
> > Do you have something like "location ~ \.php$" before
> > "location ~ /wordpress/admin(.+)" ?
> > If so, the former matchs "/wordpress/admin/post-new.php".
>
> yes i do, here's the entire config:
>
>
>  server {
>    listen 80;
>    server_name foo.com;
>    index index.php index.html;
>    root /home/mike/web/foo.com/;
>    location /wordpress/admin {
>      auth_basic "wordpress";
>      auth_basic_user_file /home/mike/web/foo.com/.htpasswd;
>      location ~ \.php$ {
>        fastcgi_pass 127.0.0.1:11000;
>        fastcgi_index index.php;
>      }
>    }
>    location ~ \.php$ {
>      fastcgi_pass 127.0.0.1:11000;
>      fastcgi_index index.php;
>    }
>    if (!-e $request_filename) {
>      rewrite ^(.+)$ /wordpress/index.php?q=$1 last;
>    }
>  }
>





More information about the nginx mailing list