gpt4 book ai didi

apache - 基本身份验证错误 500

转载 作者:行者123 更新时间:2023-12-02 09:30:04 25 4
gpt4 key购买 nike

我有这个.htaccess

AuthType Basic
AuthName "Protected Area"
AuthUserFile /.htpasswds/.htpasswd
Require valid-user

还有一个.htpassword

test:$apr1$zXAu7nnl$612DeubGZ9jDrDPB1S8VO0

目录结构为:

/.htpasswds/.htpasswd
/public_html/.htaccess

任何登录尝试都会出现 500 错误。在 cpanel 中,错误未记录在错误日志中。

最佳答案

我在 cPanel 上遇到了非常类似的问题 - 输入基本身份验证凭据时出现错误 500“内部错误”。

问题似乎源于 cPanel 将密码文件放入 apache 进程无法访问的目录中。将其移动到帐户的根文件夹(创建 public_html 目录的位置)可以解决我的问题。 .htaccess 中的 AuthUserFile 条目仍必须指向文件的绝对路径名,例如:

AuthUserFile“/home/myaccount/.passwd”

网站根目录位于/home/myaccount/public_html/

关于apache - 基本身份验证错误 500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19967599/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com