全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1335|回复: 3
打印 上一主题 下一主题

phpStudy用htpasswd加密文件夹的问题求救

[复制链接]
跳转到指定楼层
1#
发表于 2018-6-20 17:27:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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报错!

求高手指点!
2#
发表于 2018-6-20 17:41:11 | 只看该作者
500 是服务器本身的错误与 htpasswd 无关,

3#
 楼主| 发表于 2018-6-20 17:49:39 | 只看该作者
再看了下 不是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.
4#
发表于 2018-6-20 19:54:00 | 只看该作者
.htpasswd
改成htpasswd.txt
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-17 09:20 , Processed in 0.061762 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表