当前位置:论坛首页 > Linux面板 > 求助

【已回应】Apache下启用HTTP/2失败 报错mpm module prefork not support

发表在 Linux面板2019-10-21 16:12 [复制链接] 2 2179

如题,系统版本如下:
面板版本 7.02,

Apache版本 2.4.41
PHP版本  5.5和5.4

看到面版原有的apache配置文件中已启用了HTTP/2:

LoadModule http2_module modules/mod_http2.so

<IfModule http2_module>
ProtocolsHonorOrder On
Protocols h2 http/1.1
</IfModule>


然后再网站的配置文件中也已指定开启HTTP/2
<VirtualHost *:443>

...   

Protocols h2 h2c http/1.1   

...
</VirtualHost>

但实际客户端访问时,却还是工作在HTTP1.1版本下。

通过打开日志,发现错误提示:


[http2:info] [pid 5410] AH03090: mod_http2 (v1.15.4, feats=CHPRIO+SHA256+INVHD+DWINS, nghttp2 1.22.0), initializing...
[Mon Oct 21 14:21:44.440052 2019] [http2:warn] [pid 5410] 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.
[Mon Oct 21 14:21:44.443079 2019] [mpm_prefork:notice] [pid 5410] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.1.1b configured -- resuming normal operations
[Mon Oct 21 14:21:44.443121 2019] [mpm_prefork:info] [pid 5410] AH00164: Server built: Oct 19 2019 10:34:10


发现问题所在:
mod_http2不兼容于prefork模式, 导致启动http/2失败。





使用道具 举报 只看该作者 回复
发表于 2019-10-21 16:49:20 | 显示全部楼层
问题已解决:

在Apache配置文件中改为加载mpm_event模块,

原配置
#LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

更改为:
LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so


至此,问题解决。
使用道具 举报 回复 支持 反对
发表于 2019-10-21 17:54:12 | 显示全部楼层
默认event模式启动的 是否是远古版本升级上来的apache?
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析
快速回复 返回顶部 返回列表