Closed RockNHawk closed 6 years ago
How did you generate the users.digest
file?
I use htdigest.py passwdfile username 'realm name' to generate it.
here is the generated password: username:n1:00a002db781cb62154383ec438b05e72 username:n2:8f19e5da450121388a6d1abef6e8730a
and the password both are 1.
And you are using the same realm (this is not for you
) that you use in your nginx config when you generate the password?
Everything seems correct so it should be working. The only thing I can think of is that the realm isn't matching or you are providing a different username/password then what you generated.
Hello. I have already generated the password file & the file is touchable & configured for nginx .
` server { listen 80; listen 443 ssl;
} `
And The access log is:
114.83.89.170 - - [05/Aug/2017:11:33:52 +0800] "GET / HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
114.83.89.170 - - [05/Aug/2017:11:33:56 +0800] "GET / HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
114.83.89.170 - - [05/Aug/2017:11:33:59 +0800] "GET / HTTP/1.1" 401 590 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
But the authentication always fail, browser always popup the "Authentication Required" dialog.
Can you help me review the problem ?