全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1314|回复: 3

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

[复制链接]
发表于 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报错!

求高手指点!
发表于 2018-6-20 17:41:11 | 显示全部楼层
500 是服务器本身的错误与 htpasswd 无关,

 楼主| 发表于 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 admin@php.cn 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.
发表于 2018-6-20 19:54:00 | 显示全部楼层
.htpasswd
改成htpasswd.txt
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-28 01:32 , Processed in 0.059242 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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