basic-authentication and php?

Michael Shadle mike503 at gmail.com
Fri May 22 21:36:50 MSD 2009


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.





More information about the nginx mailing list