连接 AWS 服务器时日志文件出错

连接 AWS 服务器时日志文件出错

我正在使用 terraform 在 AWS 中创建实例。我很好地连接到服务器,但日志文件有以下错误。

[Tue Oct 23 18:49:33.725989 2018] [suexec:notice] [pid 11845] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 23 18:49:33.737687 2018] [lbmethod_heartbeat:notice] [pid 11845] AH02282: No slotmem from mod_heartmonitor
[Tue Oct 23 18:49:33.737724 2018] [http2:warn] [pid 11845] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Tue Oct 23 18:49:33.737728 2018] [http2:warn] [pid 11845] AH02951: mod_ssl does not seem to be enabled
[Tue Oct 23 18:49:33.742054 2018] [mpm_prefork:notice] [pid 11845] AH00163: Apache/2.4.34 () configured -- resuming normal operations
[Tue Oct 23 18:49:33.742072 2018] [core:notice] [pid 11845] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

如果我的问题不清楚,请见谅。我主要关心的是如何将 mpm 默认值更改prefork为类似eventwork。当我运行命令时/usr/sbin/httpd -V,我注意到默认情况下会加载 prefork。我该如何更改这一点?

答案1

这些都是Apache httpd日志消息。它们甚至不是错误,只是通知。不要担心它们或配置适当的 Apache 模块(mod_ssl 等)。

好的起点:http://httpd.apache.org/

答案2

实际上,即使这是警告,您也需要注意以下消息:

[Tue Oct 23 18:49:33.737724 2018] [http2:warn] [pid 11845] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.

他们告诉你,你的 Linux 发行版已经安装了更兼容的 MPM(见https://httpd.apache.org/docs/2.4/en/mpm.html) 变为 prefork。

如果您不运行任何非线程安全的东西(PHP 作为 apache 原生模块,通常会让您停留在 prefork MPM 上),您可能需要切换到另一个 MPM(如“事件”)以完全符合 http2 标准。

apt-get install apache2-mpm-event例如,在基于 Debian 的系统上

相关内容