Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Permission denied: FastCGI: failed to connect to server “/usr/lib/cgi-bin/php5-fcgi”: connect() failed – Apache 2.2 / PHP-FPM 5.4 – CentOS

Have been working on setting up a server without a control panel with Apache and PHP-FPM, out of the gate I started getting Internal Server error messages, investigating the httpd error log revealed the following:

Permission denied: FastCGI: failed to connect to server "/usr/lib/cgi-bin/php5-fcgi": connect() failed

The fix turned out to be relatively simple, make the following changes to the www.conf file at /etc/php-fpm.d

listen.owner = apache
listen.group = apache
listen.mode = 0666

Restart apache and php-fpm and things should start to work

 

credits: ikben @ original thread