如何从Apache服务器查看错误信息和调试信息?

发布于 2024-09-15 08:35:42 字数 188 浏览 4 评论 0原文

如今,当运行 WAMP 或 MAMP(或 Mac 上的默认 Web 服务器)时,每当 CGI 文件(例如 Ruby 或 PHP)出现错误时,都不会显示错误消息(也不会显示行号)。有没有办法在 shell 中运行 Web 服务器以便显示任何错误消息?

我试图展示的是 Mac 的内置 Web 服务器。 (也许在其他MAMP或WAMP平台上有点不同)

Nowadays when running WAMP or MAMP (or the default web server on a Mac), whenever there is error from the CGI file (such as Ruby or PHP), the error message is not shown (and no line number either). Is there a way to run the web server in a shell so that any error message is shown?

The one I am trying to show is on a Mac's built-in web server. (maybe it is a little different in other MAMP or WAMP platforms)

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

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

发布评论

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

评论(1

衣神在巴黎 2024-09-22 08:35:42

您可以在 apache 上默认 Web 服务器的 /var/log/apache2/error_log 中找到 CGI 脚本的错误。

您可以使用以下方式查看实时结果:

tail -f /var/log/apache2/error_log

You can find the errors of CGI scripts in /var/log/apache2/error_log for the default web server on apache.

You can view realtime results using :

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