我一直在安装php-fpm
与apache2-mpm-worker
. 这是我正在遵循的指南。
根据指南的第 5 步,
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
但是我找不到php5-fcgi
,/usr/lib
只有/usr/bin/php5-cgi
和/usr/bin/php-cgi
,我不确定它们是否相同。
所以我将第 5 步中的行更改为:
Alias /php5-fcgi /usr/bin/php5-fcgi
FastCgiExternalServer /usr/bin/php5-fcgi -host 127.0.0.1:9000 -pass-header
在重新启动 Apache 时,它的日志给出了错误:
[notice] caught SIGTERM, shutting down
[alert] (4)Interrupted system call: FastCGI: read() from pipe failed (0)
[alert] (4)Interrupted system call: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye
[notice] Apache/2.2.22 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured -- resuming normal operations
[notice] FastCGI: process manager initialized (pid 16348)
并加载索引页面
[error] [client 10.0.2.2] (111)Connection refused: FastCGI: failed to connect to server "/usr/bin/php5-cgi": connect() failed
[error] [client 10.0.2.2] FastCGI: incomplete headers (0 bytes) received from server "/usr/bin/php5-cgi"
[error] [client 10.0.2.2] File does not exist: /var/www/mydomain/public/favicon.ico
问题:知道为什么php5-fcgi
会丢失,应该如何解决这个问题?谢谢!!:)
你应该把它设置回
它不存在,因为下一行拦截调用并将其转发给 fpm