Welcome! Log In Create A New Profile

Advanced

HttpAuthBasicModule

Posted by nicco 
HttpAuthBasicModule
March 25, 2011 06:08AM
Hi,
I am using nginx 0.8.53-1 as reverse proxy on a NSLU2 unslung 6.10 and everything works fine.

nginx.conf:
...
server {
listen 9000;
server_name nicolasarti.homepc.it;
location / {
proxy_pass http://192.168.1.61:9010/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
...

If I configure HTTP Basic Authentication, the password does not match:

nginx.conf:
...
server {
listen 9000;
server_name nicolasarti.homepc.it;
auth_basic "Restricted";
auth_basic_user_file /opt/etc/nginx/.htpasswd;
location / {
proxy_pass http://192.168.1.61:9010/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
...

error.log:
...
03/25/2011 10:55:29 [error] 20121 # 0: * 4 user "test ": password mismatch, client: 82.185.155.4, Server: nicolasarti.homepc.it, request: "GET / HTTP/1.1" , host: "nicolasarti.homepc.it"
...

The. htpasswd file is generated with the pyton script htpasswd.py.

#. / htpasswd.py -c -b /opt/etc/nginx/.htpasswd test test

# cat. htpasswd
test: t8mLSbPvfpnCM
#

I tried with the Apache htpasswd utility, but without success.

Can anyone help me?

Thanks.
Re: HttpAuthBasicModule
April 27, 2011 09:39AM
tnx
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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