我们通过Charter的Web托管使用Plesk网站生成器来创建一个简单的开发网站。
我正在尝试使用.htaccess / .htpasswd密码保护该网站。
无论我做什么,我都会收到以下错误提示:
我正在尝试使用.htaccess / .htpasswd密码保护该网站。
无论我做什么,我都会收到以下错误提示:
[Wed Apr 06 09:02:57 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /.htpasswd
[Wed Apr 06 09:02:57 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'heather' not configured
[Wed Apr 06 09:03:52 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/.htpasswd
[Wed Apr 06 09:03:52 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'admin' not configured
[Wed Apr 06 09:03:56 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/.htpasswd
[Wed Apr 06 09:03:56 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'heather' not configured
[Wed Apr 06 09:05:11 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/HTTP/.htpasswd
[Wed Apr 06 09:05:11 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'admin' not configured
[Wed Apr 06 09:05:15 2016] [error] [client 66.169.84.65] (2)No such file or directory: Could not open password file: /etc/httpd/HTTP/.htpasswd
[Wed Apr 06 09:05:15 2016] [error] [client 66.169.84.65] access to / failed, reason: verification of user id 'heather' not configured
我不太熟悉Parallels Plesk,而且联系他们的支持就像拔牙一样困难。
- 我已经检查了.htpasswd文件的路径,并进行了双重检查;看起来是正确的。
- 我已经将它和.htaccess文件移动到其他位置,看看是否放错了地方。
我不确定问题出在哪里。我收到了身份验证框(但我注意到它没有我的“请登录”消息......
以下是.htaccess文件的代码:
#
# AUTHENTICATION
#
### BASIC PASSWORD PROTECTION
AuthUserFile /etc/httpd/HTTP/.htpasswd
AuthName "Please Login"
AuthType basic
<Limit GET POST>
Require valid-user
</Limit>
非常感谢您的帮助或提供正确的方向。提前致谢!