Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Cannot get auth_basic working

$
0
0
Hi all,

I am using nginx 1.5.12 on windows 7, and I cannot get basic authentication working...

Here is the situation:

- in nginx.conf:
[...]
location / {
root html;
index index.html index.htm;
auth_basic "ngvplatform";
auth_basic_user_file c:/nginx/conf/htpasswd;
}
[...]

- in c:/nginx/conf/htpasswd, nothing but these 2 lines:
phil:YAsIdyZPQf712
daniel:YAsIdyZPQf712

- I did get the encrypted password from the following command (is /this/ the point?):
C:\nginx>openssl passwd -crypt password
YAsIdyZPQf712

Then, the behavior on the web browser (Firefox 28 or IE10) is:

- the authentication window appears, asking for credentials for realm "ngvplatform". Fine :-)

- after entering "phil" as name and "password" as password (which should be legal) this window closes and opens again, asking for the same.

- same behavior if I enter "toto" as name and "password" as password (an unknown user).

- this repeats again and again... I cannot get logged in.

- in the error.log file, I can found many samples of the 2 following different lines:
2014/04/04 18:14:27 [error] 3256#5800: *3 user "phil": password mismatch, client: 172.16.25.211, server: wpmaurisset.eu.lectra.com, request: "GET / HTTP/1.1", host: "wpmaurisset.eu.lectra.com"
2014/04/04 18:15:03 [error] 3256#5800: *3 user "toto" was not found in "c:/nginx/conf/htpasswd", client: 172.16.25.211, server: wpmaurisset.eu.lectra.com, request: "GET / HTTP/1.1", host: "wpmaurisset.eu.lectra.com"

Could you please help me to find where I am wrong?
Thanks in advance,
Philippe.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>