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

mike mike503 at gmail.com
Sat Aug 16 14:19:23 MSD 2008


okay i've fixed it.

currently running 0.7.10 with maxim's dirlist patch (had some fuzz)
and your static post patch.

config is:

       server {
                listen 80;
                server_name foo.com;
                index index.php index.html;
                root /home/mike/web/foo.com/;
                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/foo.com/.htpasswd;
                        location ~ \.php$ {
                                fastcgi_pass 127.0.0.1:11000;
                        }
                }
                location ~ \.php$ {
                        fastcgi_pass 127.0.0.1:11000;
                }
        }

apparently the regex i tried earlier for admin was wrong. i had the
right idea though.

i would like to know what the behavior will be when you apply the
dirlist patch to know if i need to adjust my side or not. thanks :)


On 8/16/08, mike <mike503 at gmail.com> wrote:
> yeah i've tried a vanilla 0.7.8 with maxim's patch and it still isn't
> processing PHP inside of that nested location block for admin.
>
> something is messed up. before it was working it looked like. but now
> i can't get any 0.7.8 or 0.7.10 with any patches to process that admin
> block properly!
>
>
> On 8/16/08, mike <mike503 at gmail.com> wrote:
> > On 8/16/08, Igor Sysoev <is at rambler-co.ru> wrote:
> > > On Sat, Aug 16, 2008 at 01:48:22AM -0700, mike wrote:
> > >
> > > > On 8/16/08, Igor Sysoev <is at rambler-co.ru> wrote:
> > > >
> > > > > What patch do you mean ?
> > > >
> > > > Ideally all three of these patches to work in 0.7.10:
> > > >
> > > > 1) http://marc.info/?l=nginx&m=121871958203885&w=2 -
> > > > 2) http://marc.info/?l=nginx&m=121818872305549&w=2 - applies
> > > > 3) and the static post patch you just supplied - it applies with fuzz
> > > >
> > > > (I apply these using patch -p1 < patch.txt, let me know if there is a
> > > > better way)
> > >
> > > 1) and 3) are the same slightly different patch. Use the 3) only.
> > > it will be in 0.7.11 certainly.
> > >
> > > 2) will probably be 0.7.11 too. Additional syscalls should be compensated
> > > by "open_file_cache_errors  on".
> >
> > okay, now i haven't changed my config, but i am getting prompted to
> > download/PHP is not parsing for both 0.7.8 and 0.7.10!
> >
> > so now my PHP is not being parsed inside of the admin location block
> > at all... and i'm using my original 0.7.8 with the two patches i
> > already had on it. i don't know how this has happened now.
> >
> >
> >
> > and i want to ask a clarification: will maxim's patch be adopted
> > as-is, and if people don't like that behavior they have the option to
> > set the open_file_cache_errors option? i am trying to figure out if it
> > will behave how i want by default, or if i am the one that needs to
> > make a config change :)
> >
>





More information about the nginx mailing list