调试 XAMPP 身份验证问题的更好方法

发布于 2024-09-26 14:21:34 字数 732 浏览 6 评论 0原文

我一直在本地主机上进行简单的身份验证过程,这是 .htaccess 文件:

AuthType Basic
AuthName "Admin login page"
AuthUserFile /Application/XAMPP/htdocs/.htpasswd
AuthGroupFile /dev/null
Require User [email protected]

我已经创建了相关的 .htpasswd 文件,浏览器可以提示我输入用户名和密码。

但是,当我尝试访问受保护的 index.html 时,输入凭据后,Firefox 只收到了 http 500 错误。

尝试使用 Firebug 和curl 检查响应,只看到 500 状态代码,没有其他方法可以让我更清楚地了解出了什么问题。

另外检查XAMPP的Apache日志文件夹下的access.log,仍然只有500个错误,没有详细的反馈。

有什么想法吗?在这种情况下你会用什么来调试?

非常感谢!

已编辑:

尝试将另一个新用户添加到 .htpasswd 文件中,但仍然无法摆脱 http 500 错误。

I've been working with a simple authentication process on localhost, here is the .htaccess file:

AuthType Basic
AuthName "Admin login page"
AuthUserFile /Application/XAMPP/htdocs/.htpasswd
AuthGroupFile /dev/null
Require User [email protected]

I have created the related .htpasswd file, the browser can prompt for me to enter the username and password.

However, when I tried to access the protected index.html, after entering the credentials, Firefox only got me a http 500 error.

Tried to use Firebug and curl to inspect the response, only to see the 500 status code, nothing else could give me a clearer idea of what went wrong.

Also check the access.log under XAMPP's Apache logs folder, still just got 500 errors without detailed feedback.

Any thoughts? What would you use to debug in such a case?

Many thanks in advance!

Edited:

Tried to add another new user to the .htpasswd file, but still cannot get rid of the http 500 error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心是晴朗的。 2024-10-03 14:21:34

access.log 文件只会显示有关请求的信息,而不显示错误。在同一文件夹中查找 error.log 或 error_log (或类似的内容)。

如果不在同一文件夹中,请检查虚拟主机定义和 httpd.conf 文件以查看错误日志的存储位置。

The access.log file will only show you info about the requests, not errors. Look for error.log or error_log (or something similar) in the same folder.

If it's not in the same folder, check your virtual host definition and httpd.conf files to see where the error log is stored.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文