这是我在这里的第一篇文章,虽然我经常在这里search和find答案。 这一次,我花了几天的时间search不同的网站,但不幸的是其他线程没有答案在我的情况帮助。
我pipe理几个LAMP服务器,每个服务器托pipe10到15个虚拟主机。 每个服务器都有一个控制面板供pipe理员和客户端pipe理站点。 在过去的几年里,在mod_php的Centos 6上运行得很好。
我现在正在升级控制面板,在安装了mod_fcgid的PHP的Centos 7上运行。
每个虚拟主机都有自己的apache conf文件,如下所示:
<VirtualHost 136.243.195.117:80> DocumentRoot "/home/c7demose/public_html" ServerName c7.demoserver.co.za ServerAlias www.c7.demoserver.co.za mail.c7.demoserver.co.za ftp.c7.demoserver.co.za <IfModule mod_fcgid.c> SuexecUserGroup c7demose c7demose <Directory /home/c7demose/public_html> Options +ExecCGI AllowOverride All AddHandler fcgid-script .php FCGIWrapper /var/www/php-fcgi-scripts/c7.demoserver.co.za/php-fcgi-starter .php Order allow,deny Allow from all </Directory> </IfModule> </VirtualHost>
这没有问题,每个网站按预期工作。 过去的工作方式是控制面板侦听不同的端口,其虚拟主机configuration文件侦听任何IP地址,并且没有ServerNamevariables,因此用户使用哪个域名并不重要,如果他们使用正确的端口将redirect到控制面板。
换句话说,用户与域user_one.com可以去user_one.com:10025和用户2可以去他自己的user_two.com:10025,都进入控制面板:
<VirtualHost *:10025> DocumentRoot "/var/www/html/webcp" <IfModule mod_fcgid.c> SuexecUserGroup apache apache <Directory /var/www/html/webcp> Options +ExecCGI AllowOverride All AddHandler fcgid-script .php FCGIWrapper /var/www/php-fcgi-scripts/localhost/php-fcgi-starter .php Order allow,deny Allow from all </Directory> </IfModule> </VirtualHost>
这在使用mod_php的旧设置中运行良好。 使用mod_fcgid在尝试使用这种“全部捕获”types的情况访问控制面板时,它不起作用。
浏览器显示500内部错误,httpd错误日志显示以下内容:
[Mon Mar 14 00:06:03.684684 2016] [authz_core:debug] [pid 2585] mod_authz_core.c(809): [client 165.255.92.82:40036] AH01626: authorization result of Require all granted: granted [Mon Mar 14 00:06:03.684725 2016] [authz_core:debug] [pid 2585] mod_authz_core.c(809): [client 165.255.92.82:40036] AH01626: authorization result of <RequireAny>: granted [Mon Mar 14 00:06:03.783142 2016] [authz_core:debug] [pid 2585] mod_authz_core.c(809): [client 165.255.92.82:40036] AH01626: authorization result of Require all granted: granted [Mon Mar 14 00:06:03.783178 2016] [authz_core:debug] [pid 2585] mod_authz_core.c(809): [client 165.255.92.82:40036] AH01626: authorization result of <RequireAny>: granted [Mon Mar 14 00:06:03.785111 2016] [fcgid:info] [pid 2581] mod_fcgid: server c7.demoserver.co.za:/var/www/php-fcgi-scripts/localhost/php-fcgi-starter(11458) started [Mon Mar 14 00:06:03.790277 2016] [fcgid:warn] [pid 2585] (104)Connection reset by peer: [client 165.255.92.82:40036] mod_fcgid: error reading data from FastCGI server [Mon Mar 14 00:06:03.790305 2016] [core:error] [pid 2585] [client 165.255.92.82:40036] End of script output before headers: index.php [Mon Mar 14 00:06:09.790430 2016] [fcgid:info] [pid 2581] mod_fcgid: process /var/www/php-fcgi-scripts/localhost/php-fcgi-starter(11458) exit(communication error), terminated by calling exit(), return code: 107
理想情况下,我希望得到这一切都与fast_cgi工作,但如果有一种方法,我可以让虚拟主机继续与fcgi运行,只是端口10025控制面板运行使用mod_php那么这将是一个可以接受的临时解决scheme,我只是不知道如何或甚至是否有可能。
提前致谢!
约翰