Answers:
编辑:/ etc / sysconfig / httpd
取消注释:
HTTPD=/usr/sbin/httpd.worker
重新启动,瞧!
编辑: /etc/sysconfig/httpd
并没有评论:
HTTPD=/usr/sbin/httpd.worker
重新启动httpd(服务httpd重新启动)后,出现以下错误:
Stopping httpd: [ OK ]
Starting httpd: httpd.worker: Syntax error on line 222 of /etc/httpd/conf/httpd.conf: Syntax error on line 9 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5-zts.so into server: /etc/httpd/modules/libphp5-zts.so: cannot open shared object file: No such file or directory
[FAILED]
您可能需要安装php-zts。
yum install php-zts
之后,不再显示任何错误消息,并且httpd在模块辅助程序处于活动状态时正常启动。
CentOS 6x:
修改文件:/ etc / sysconfig / httpd
HTTPD=/usr/sbin/httpd.worker
CentOS 7x:
$ cat /etc/httpd/conf.modules.d/00-mpm.conf
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
重新开始