找回密码
 立即注册
CeraNetworksBGVM服务器主机交流IP归属甄别会员请立即修改密码
查看: 39|回复: 3

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

[复制链接]

52

主题

69

回帖

456

积分

中级会员

积分
456
发表于 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报错!

求高手指点!
回复

使用道具 举报

12

主题

854

回帖

2729

积分

金牌会员

积分
2729
发表于 2018-6-20 17:41:11 | 显示全部楼层
500 是服务器本身的错误与 htpasswd 无关,

回复

使用道具 举报

52

主题

69

回帖

456

积分

中级会员

积分
456
 楼主| 发表于 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.
回复

使用道具 举报

57

主题

542

回帖

2046

积分

金牌会员

积分
2046
发表于 2018-6-20 19:54:00 | 显示全部楼层
.htpasswd
改成htpasswd.txt
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|HS2V主机综合交流论坛

GMT+8, 2024-6-19 01:22 , Processed in 0.059726 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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