Apache can't connect to php5-fpm
I'm using php (latest) and apache and after provisioning I got a 500-error. This was in the apache error log:
[Fri May 09 09:13:06.149292 2014] [fastcgi:error] [pid 18537:tid 139690281211648] (13)Permission denied: [client 192.168.33.101:35036] FastCGI: failed to connect to server "/usr/lib/cgi-bin/php5-fcgi": connect() failed
[Fri May 09 09:13:06.255308 2014] [fastcgi:error] [pid 18537:tid 139690281211648] [client 192.168.33.101:35036] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5-fcgi"
After some investigating I managed to fix it by editing /etc/php5/fpm/pool.d/www.conf , uncommenting these lines and restarting php5-fmp (service php5-fpm restart):
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
This should probaby be configured in scripts/php.sh
Tbis is based off of the master branch or develop branch?
Any configurations changed in your end from the defaults?
On Friday, May 9, 2014, Ben Bridts [email protected] wrote:
I'm using php (latest) and apache and after provisioning I got a 500-error. This was in the apache error log:
[Fri May 09 09:13:06.149292 2014] [fastcgi:error] pid 18537:tid 139690281211648Permission denied: [client 192.168.33.101:35036] FastCGI: failed to connect to server "/usr/lib/cgi-bin/php5-fcgi": connect() failed [Fri May 09 09:13:06.255308 2014] [fastcgi:error] [pid 18537:tid 139690281211648] [client 192.168.33.101:35036] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5-fcgi"
After some investigating I managed to fix it by editing /etc/php5/fpm/pool.d/www.conf , uncommenting these lines and restarting php5-fmp (service php5-fpm restart):
listen.owner = www-data listen.group = www-data listen.mode = 0660
This should probaby be configured in scripts/php.sh
— Reply to this email directly or view it on GitHubhttps://github.com/fideloper/Vaprobash/issues/306 .
I'm getting this too - master branch, fresh vagrant provision
Edit: Changes from op fixed my issue, chmoding the socket file didn't help
Had same issue. Master branch, provisioned from scratch. PHP changed from 5.5.11 to 5.5.12 since this issue, fixed by using:
sudo chmod 666 /var/run/php5-fpm.sock
Using nginx.
Looks like an update to php5-fpm.
From the notes in the conf, I think uncommenting the following:
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
...will be the best fix for this - Permissions set on the sock file may just get reset when fpm or the server is restarted.
(thanks @bandb42!)
Thank you for the quick fix, @fideloper
The rationale behind the change in php5-fpm can be found in this upstream bug.
Nice, thanks for the added context. I was trying to find something like that to see if they had an explanation of changes in their docs or something.