小编bac*_*ord的帖子

创建 htpasswd 并编辑 htaccess 后出现 500 错误

我刚刚编辑了.htaccess文件以包括:

AuthType Basic
AuthName "My Protected Area"
AuthUserFile /home/path/to/public_html/
Require valid-user
Run Code Online (Sandbox Code Playgroud)

然后我.htpasswd通过htpasswd命令创建了一个文件。我已启用模块:LoadModule authn_file_module modules/mod_authn_file.so在 Apache 配置中。

现在,当我加载页面时,出现 500 错误,Apache 日志显示:

配置错误:无法检查用户。没有用户文件?:/

.htaccess .htpasswd apache-2.2

2
推荐指数
1
解决办法
4263
查看次数

标签 统计

.htaccess ×1

.htpasswd ×1

apache-2.2 ×1