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

mike mike503 at
Sat Aug 16 23:39:13 MSD 2008

On 8/16/08, Igor Sysoev <is at> wrote:

> > yeah - it did not work. PHP (the nested fastcgi location inside of the
> > admin location) was not processing anymore.
> Yes, this is a bug. I'm looking how to resolve it.

well the regex i'm using -is- working for now. but i would like to
have my configuration fully Igor approved :)

right now everything is working great - the dirtest patch, the nested
location block with the regex. i can't really test the static post
behavior (unless it's transparent in the background) or would it be a
POST to a file that is being referenced from error_page 404 =
/wordpress/index.php?q=$request_uri;  ?

If so, I need to setup a test at home using an error_page 404 handler
that actually accepts the post data (if you want someone else to

For your reference this is working 100% correctly right now it appears:

       server {
                listen 80;
                index index.php index.html;
                root /home/mike/web/;
                include /etc/nginx/defaults.conf;
                include /etc/nginx/expires.conf;
                error_page 404 = /wordpress/index.php?q=$request_uri;
                location ~ /wordpress/admin.* {
                        auth_basic "wordpress";
                        auth_basic_user_file /home/mike/web/;
                        location ~ \.php$ {
                location ~ \.php$ {

using 0.7.10 + your latest dirtest patch + your static post patch.
debug is enabled too.

More information about the nginx mailing list