htaccess doesn't work - always wrong password

前端 未结 9 2326
盖世英雄少女心
盖世英雄少女心 2020-12-15 04:04

I am trying to password protect a directory, and have two files in the directory which should password protected it:

  • .htaccess
  • .htpasswd
<
9条回答
  •  时光取名叫无心
    2020-12-15 04:39

    I spent about 2 hours to resolve the same issue. But problem was in nginx. I have nginx as front web server and there was a line for proxy configuration:

    proxy_set_header Authorization "";

    It overrides Authorization field and apache don't receive login and password typed in.

    I just commented out this line and it worked.

提交回复
热议问题