nginx-basic-auth-don';我不能在windows上工作

nginx-basic-auth-don';我不能在windows上工作,nginx,basic-authentication,Nginx,Basic Authentication,这是nginx conf(window2003服务器)的一部分 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 Authorizatio

这是nginx conf(window2003服务器)的一部分

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
网站提示我输入的用户名和密码(正确),反复重复此提示

  • 密码文件是通过Mac OS上的
    htpassword
    命令创建的
  • tomcat应用程序的代理
  • 对于Windows,nginx版本为
    1.7.12
  • 可能是带有nginx的httpbasicuthmodule不支持windows平台?

    Its

    auth_basic  "Restricted";
    auth_basic_user_file  c:/xxx/password_file;
    

    参见

    用答案和示例修订。