我一直在尝试在我的 apache 服务器中设置 fcgi 和 suexec。
我读过这些文章
http://blog.koenreiniers.nl/guide-to-combining-apache-virtual-hosts-and-php7-fpm/
我已经完成一半设置但仍然出现错误 500 内部服务器错误。
这是我的 fastcgi-custom.conf,它应用全局配置
<IfModule mod_fastcgi.c>
<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
</IfModule>
这是我的 sites-available/website.conf
<IfModule mod_fastcgi.c>
AddHandler php7-fcgi-myuser .php
Action php7-fcgi-myuser/php7-fcgi-myuser
Alias /php7-fcgi-myuser /usr/lib/cgi-bin/php7.fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php7.fcgi -socket /run/php/php7.0-fpm.mysuser.sock -pass-header Authorization
<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler php7-fcgi-myuser
</FilesMatch>
</IfModule>
我的池用户文件是
/etc/php/7.0/fpm/pool.d/myuser.conf
[myuser]
user = myuser
group = www-data
listen = /run/php/php7.0-fpm.myuser.sock
举个例子, http://blog.koenreiniers.nl/guide-to-combining-apache-virtual-hosts-and-php7-fpm/
没有 /run/php/php7.0-fpm.myuser.sock 文件
我的日志文件中有以下错误
[fastcgi:error] [pid 2141] [client 103.21.172.30:35622] FastCGI: comm with (dynamic) server "/usr/lib/cgi-bin/php7.fcgi" aborted: (first read) idle timeout (30 sec), referer: https://mydomain.co.nz/
[fastcgi:error] [pid 2141] [client 103.21.172.30:35622] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php7.fcgi", referer: https://mydomain.co.nz/
任何帮助,将不胜感激
另外如果有人知道 fCGI 文档请告诉我
谢谢