This is my a 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 my input username & password(correct), repeat this tips again and again。
- password_file is created by
htpassword
command on Mac OS.- http://127.0.0.1:3000/xx/ proxy for tomcat application .
- nginx version is
1.7.12
for window.
May be HttpBasicAuthModule with nginx not support windows platform ?
Its;
See http://forum.nginx.org/read.php?2,254125,254187#msg-254187