.htaccess .htaces和.htpasswd是否给出错误?
嗯,我正试图用.htaccess和.htpasswd保护我的xampp,我看不出有什么错误,我认识的许多其他开发人员也是如此 我的.htaccess:.htaccess .htaces和.htpasswd是否给出错误?,.htaccess,.htpasswd,.htaccess,.htpasswd,嗯,我正试图用.htaccess和.htpasswd保护我的xampp,我看不出有什么错误,我认识的许多其他开发人员也是如此 我的.htaccess: AuthName "Protected Area" AuthType Basic AuthUserFile C:/xampp/secret/hidden/place/.htpasswd require valid-user php_flag register_globals on My.htpasswd: wscript:$apr1$Y107O
AuthName "Protected Area"
AuthType Basic
AuthUserFile C:/xampp/secret/hidden/place/.htpasswd
require valid-user
php_flag register_globals on
My.htpasswd:
wscript:$apr1$Y107OG1n$Ui6D997SqhERXXyV9VBU51
错误是错误500
有人吗?您应该查阅错误日志文件,通常位于:
/var/log/apache2/error.log
。在不知道确切错误的情况下,实际上只有猜测可能是什么问题
AuthName "Protected Area"
AuthType Basic
AuthUserFile C:/xampp/apache/var/www/site/.htpasswd
Require valid-user
- 要求有效用户应为大写“R”
- AuthUserFile通常位于web根目录上方的一个目录中
- 需要设置.htaccess和.htpasswd上的权限,以便Apache能够读取它们:chmod 0644.htaccess chmod 0644.htpasswd
()检查您的Apache error.log文件,看看您遇到了什么错误。