nginx basic auth don't work on windows -
this part of nginx conf (window2003 server)
server { listen 80; server_name xxx.example.com; access_log logs/example.com.log; location / { auth_basic "restricted"; auth_basic_user_file c:/xxx/password_file; proxy_set_header authorization ""; proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-server $host; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:3000/xx/; } }
visit xxx.exmaple.com
site tips input username & password(correct), repeat tips again , again。
- password_file created
htpassword
command on mac os.- http://127.0.0.1:3000/xx/ proxy tomcat application .
- nginx version
1.7.12
window.
may httpbasicauthmodule nginx not support windows platform ?
its;
auth_basic "restricted"; auth_basic_user_file c:/xxx/password_file;
see http://forum.nginx.org/read.php?2,254125,254187#msg-254187
Comments
Post a Comment