Apache和PHP-FPM问题

尝试在php7.0-fpm上使用mpm_workermpm_event实现php7.0-fpm时,遇到apache问题。 php7.0-fpm可以正常使用mpm_prefork但是具体的mpm对于我的需求来说效率不够高。

导航到url时收到500个错误。

这是一个VestaCP作为主机控制面板运行的系统。 我已经修改了虚拟主机模板为php-fpm友好:

 <VirtualHost %ip%:%web_port%> ServerName %domain_idn% %alias_string% ServerAdmin %email% DocumentRoot %docroot% ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/ Alias /vstats/ %home%/%user%/web/%domain%/stats/ Alias /error/ %home%/%user%/web/%domain%/document_errors/ #SuexecUserGroup %user% %group% CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes CustomLog /var/log/%web_system%/domains/%domain%.log combined ErrorLog /var/log/%web_system%/domains/%domain%.error.log <Directory %docroot%> AllowOverride All Options +Includes -Indexes +ExecCGI </Directory> <FilesMatch "\.php$"> SetHandler "proxy:fcgi://127.0.0.1:9000/" </FilesMatch> <Directory %home%/%user%/web/%domain%/stats> AllowOverride All </Directory> <IfModule mod_ruid2.c> RMode config RUidGid %user% %group% RGroups www-data </IfModule> <IfModule itk.c> AssignUserID %user% %group% </IfModule> IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf* </VirtualHost> 

下面是我的apache错误,我似乎无法修复。

 2017/01/04 23:59:13 [error] 1418#1418: *51 upstream prematurely closed connection while reading response header from upstream, client: <mypublicip>, server: test.elliot-labs.com, request: "GET /info.php HTTP/1.1", upstream: "http://<internalIPaddress>:8080/info.php", host: "test.elliot-labs.com" 

这是我的PHP-FPM日志:

 [04-Jan-2017 23:57:30] NOTICE: fpm is running, pid 8863 [04-Jan-2017 23:57:30] NOTICE: ready to handle connections [04-Jan-2017 23:57:30] NOTICE: systemd monitor interval set to 10000ms 

TL; DR:

为什么PHP-FPM7.0不能和Apache2.4一起使用MPM_WorkerMPM_Event