调试 XAMPP 身份验证问题的更好方法
我一直在本地主机上进行简单的身份验证过程,这是 .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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.