我想增加MaxSpareServers
.
<IfModule mpm_prefork_module>
MaxSpareServers 20
</IfModule>
但是,我在测试时收到以下错误。
[root@server_1 conf.modules.d]# httpd -t
AH00526: Syntax error on line 26 of /etc/httpd/conf.modules.d/00-mpm.conf:
Invalid command 'MaxSpareServers', perhaps misspelled or defined by a module not included in the server configuration
然后我验证了几个点,例如 MPM 选择
[root@server_1 worker]# httpd -V | grep -i mpm
Server MPM: worker
[root@server_1 worker]# httpd -M | grep -i mpm
mpm_worker_module (shared)
奇怪的是,当我检查加载的模块时,我找不到worker.c
[root@server_1 worker]# httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
这可能是无法更改服务器配置的原因MaxSpareServers
吗?如果是这样,我该如何解决这个问题?
请参阅下面的版本详细信息
[root@server_1 worker]# yum info httpd
Loaded plugins: auto-update-debuginfo, changelog, fastestmirror, product-id, search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
Installed Packages
Name : httpd
Arch : x86_64
Version : 2.4.52
Release : 1.codeit.el7
Size : 4.3 M
Repo : installed
From repo : CodeIT
Summary : Apache HTTP Server
URL : https://httpd.apache.org/
License : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
: web server.
您正在运行
mpm_worker_module
,但MaxSpareServers
定义为mpm_prefork_module
.