June 05, 2011 04:22PM
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;
}

proxy_pass http://MY.IP.IS.HERE:8081;
include proxy.inc;
} #-- End of root location

location @backend {
internal;
proxy_pass http://MY.IP.IS.HERE:8081;
include proxy.inc;
}
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: 174
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