全球主机交流论坛

标题: phpStudy用htpasswd加密文件夹的问题求救 [打印本页]

作者: wistonwang    时间: 2018-6-20 17:27
标题: phpStudy用htpasswd加密文件夹的问题求救
PHP安装根目录:D:\phpStudy\PHPTutorial\WWW
网站自定义目录在D:\blog
密码放在 D:/download/.htpasswd
已经在线生成

然后HTACCESS加密目录访问 无法生效

HTACCESS 1:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile D:/download/.htpasswd
AuthGroupFile /dev/null
require valid-user

HTACCESS 2:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /.htpasswd
AuthGroupFile /dev/null
require valid-user

这两种都无法让htpasswd工作

直接500报错!

求高手指点!
作者: 三思而后折腾    时间: 2018-6-20 17:41
500 是服务器本身的错误与 htpasswd 无关,


作者: wistonwang    时间: 2018-6-20 17:49
再看了下 不是505 是下面的错误


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

作者: loveni    时间: 2018-6-20 19:54
.htpasswd
改成htpasswd.txt




欢迎光临 全球主机交流论坛 (https://ddzzz.eu.org/) Powered by Discuz! X3.4