basic-authentication and php?
Jim Ohlstein
jim.ohlstein at gmail.com
Fri May 22 21:45:37 MSD 2009
Michael Shadle wrote:
> On Fri, May 22, 2009 at 10:31 AM, Jim Ohlstein <jim.ohlstein at gmail.com> wrote:
>
>
>> location ^~ /ppg/ {
>> auth_basic "Hello, Please login";
>> auth_basic_user_file /var/www/site.com/passwords;
>> location ~ .\php$ {
>> include /etc/nginx/fastcgi_params;
>> fastcgi_pass 127.0.0.1:9000;
>> }
>> }
>>
>> That way only your php scripts would be passed to php and others served
>> directly by nginx.
>>
>> Igor, is that possible?
>>
>
> not only is it possible, i've been doing it that way for a long time.
>
> in fact, i think igor is the one who originally gave me the example.
>
>
>
The Wiki currently lists the "context" for "location" as "server" only
which was why I was unsure.
http://wiki.nginx.org/NginxHttpCoreModule#location
Jim
More information about the nginx
mailing list