Welcome! Log In Create A New Profile

Advanced

Re: htpasswd protection prompts for index.php download

March 17, 2010 08:12PM
On Thu, Mar 18, 2010 at 7:01 AM, ppnx <nginx-forum@nginx.us> wrote:
> I could not find the information on the web or in the wiki, so I try this list. I am the user of a free hosting service using nginx. So I cannot acces or edit conf files myself, but I can ask the admin and he will do it for me.
>
> Basically, I want to protect whole folders. I think that I have managed to do that by asking the admin to add these lines to the nginx.conf file:
>
> # Password Protect important Directories
> location ~ /srv/www/users/me/(folder1|folder2)/.* {
> auth_basic "Restricted";
> auth_basic_user_file /srv/www/users/me/folder1/.htpasswd;
> }
>

location ~ /srv/www/users/me/(folder1|folder2)/.*\.php$ {
auth_basic "Restricted";
auth_basic_user_file /srv/www/users/me/folder1/.htpasswd;
fastcgi_pass .....;
........
}




--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

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

htpasswd protection prompts for index.php download

ppnx March 17, 2010 08:01PM

Re: htpasswd protection prompts for index.php download

edogawaconan March 17, 2010 08:12PM

Re: htpasswd protection prompts for index.php download

Jim Ohlstein March 17, 2010 08:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 313
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