Welcome! Log In Create A New Profile

Advanced

Re: Password protecting folder breaks PHP within that folder

Igor Sysoev
December 03, 2009 02:14AM
On Thu, Dec 03, 2009 at 01:35:28AM -0500, raab wrote:

> I'm trying to password protect a folder using htpasswd, works fine and asks for a l/p, however php in that particular folder refuses to work. PHP works anywhere else but the password protected location. Once I comment out the password protected location and restart nginx it's fine again. Wondering if someone can assist?
>
> nginx.conf is here: http://raab.ftw.net.nz/nginx.conf

root /var/www;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;

location / {
index index.php;
}

location = /500.html { }

location ~* \.(jpg|jpeg|gif)$ {
expires 30d;
}

location ~ ^/rtorrent/.+\.php$ {
fastcgi_pass 127.0.0.1:9000;
auth_basic "Restricted";
auth_basic_user_file /usr/local/nginx/htpasswd;
}

location ~ ^/rtorrent {
auth_basic "Restricted";
auth_basic_user_file /usr/local/nginx/htpasswd;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
}


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Password protecting folder breaks PHP within that folder

raab December 03, 2009 01:35AM

Re: Password protecting folder breaks PHP within that folder

Igor Sysoev December 03, 2009 02:14AM

Re: Password protecting folder breaks PHP within that folder

raab December 03, 2009 02:25AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready