I'm configuring PHP_FPM on a Centos 6 distribution. I'm using php 5.4.45 and apache 2.2.15 and the "mod_proxy.so" to call the socket. But with the following Vhost and php-fpm configuration I still get the same two issues in my site logs :
[Tue Mar 10 11:36:49 2020] [error] (111)Connection refused: proxy: FCGI: attempt to connect to 127.0.0.1:0 (*) failed [Tue Mar 10 11:36:49 2020] [error] [client 192.168.1.38] AH01079: failed to make connection to backend: localhost
I'have tried and read a huge amount of solutions but no one of them helped me so much. Here the configuration of my Vhost and php-fpm www.conf file :
<VirtualHost _default_:80> DocumentRoot "/var/www/html" <Directory "/var/www/html"> Order allow,deny Allow from all AllowOverride All </Directory> ErrorLog logs/default-error_log LogLevel warn TransferLog logs/default-access_log CustomLog logs/default-request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" ProxyPassMatch ^/(.*\.php)$ fcgi://localhost/var/www/html/$1 DirectoryIndex index.php info.php <FilesMatch \.php$> SetHandler "proxy:unix:/var/run/php-fpm/default.sock|fcgi://localhost/" </FilesMatch>
listen = /var/run/php-fpm/default.sock listen.owner = apache listen.group = apache listen.mode = 0660 user = apache group = apache listen.allowed_clients = 127.0.0.1 php_value[opcache.file_cache] = /var/lib/php/opcache
Thank you for you attention. Best regards