Welcome! Log In Create A New Profile

Advanced

Re: Simple http authentication not working

António P. P. Almeida
June 06, 2011 09:20AM
On 5 Jun 2011 21h22 WEST, nginx-forum@nginx.us wrote:

> Below is my config. The folder /site/private is supposed to show the
> usual HTTP authentication box, but the php files from that folder
> just start downloading in clear text. What am I doing wrong? The
> path of the passwd file is correct.
>
> Thanks for any pointers!
>
>
>
> location / {
>
> location
> ~.*\.(gif|jpg|png|ico|swf|rss|xml|htm|txt|js|css|gz|doc|xls|pdf)$ {
> expires max; try_files $uri @backend; log_not_found off; }
>
> location /site/private {
> auth_basic "Restricted";
> auth_basic_user_file
> /home/MYDOMAIN/.htpasswds/public_html/www/private/passwd;
> }

Right now the /site/private location is for handling static files
only. You've not defined any handler for scripts or any type of
upstream. So that's what you should get. Download the file when you
request it.

--- appa



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

Simple http authentication not working

pk899 June 05, 2011 04:22PM

Re: Simple http authentication not working

Maxim Dounin June 05, 2011 05:44PM

Re: Simple http authentication not working

António P. P. Almeida June 06, 2011 09:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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