【问题标题】:Where is log for CGI Errors in IISIIS 中 CGI 错误的日志在哪里
【发布时间】:2019-03-25 01:40:41
【问题描述】:

我使用 IIS 运行在 python (hgweb.cgi) 上编写的 CGI 脚本。

但如果出现问题,IIS 不会提供详细信息。它只是在日志中写入:

2018-10-20 10:14:52 W3SVC1 ::1 POST /hgweb.cgi/ cmd=unbundle 9000 - ::1 mercurial/proto-1.0+(Mercurial+4.1.3) - localhost:9000 502 2 1 295

错误 502。但它没有写为什么会发生。 我相信这个错误在 python 脚本的 stderr 输出中有详细说明,但是在哪里可以看到呢?

【问题讨论】:

    标签: iis cgi administration


    【解决方案1】:

    确保 iis 日志记录已启用。 如果未启用,您可以查看以下链接了解:

    How to enable logging in Internet Information Services (IIS)

    【讨论】:

    【解决方案2】:

    我的解决方案是:https://docs.python.org/2.0/lib/node246.html 我将 stderr 重定向到 stdout 并在脚本中尝试捕获。 这看起来像一个 hack,但它确实有效......

    【讨论】:

      猜你喜欢
      • 2023-03-15
      • 2015-08-31
      • 2017-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-11
      • 2014-09-13
      相关资源
      最近更新 更多