【发布时间】:2015-06-11 14:20:19
【问题描述】:
这是我的一部分 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/;
}
}
访问xxx.exmaple.com网站提示我输入的用户名和密码(正确),一遍又一遍地重复这个提示。
- password_file 由 Mac OS 上的
htpassword命令创建。- http://127.0.0.1:3000/xx/tomcat 应用代理。
- window 的nginx 版本为
1.7.12。
可能是 HttpBasicAuthModule with nginx 不支持 windows 平台?
【问题讨论】:
标签: nginx basic-authentication