Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache 2.4 Error: FCGI: attempt to connect to Unix domain socket /run/php/php7.0-fpm.sock (*) failed

Tags:

php

apache

I have updated my working Froxlor installation to PHP 7. All my customer-sites work perfectly fine (with PHP 7 via FPM).

The only problem is, that if I want to access the Froxlor Backend, I get an Erorr 503. The apache Error-Log says:

`[Tue Oct 11 10:01:04.067069 2016] [proxy:error] [pid 23949] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.0-fpm.sock (*) failed`
`[Tue Oct 11 10:01:04.089648 2016] [proxy_fcgi:error] [pid 23949] [client xx.xx.xx.xx:1819] AH01079: failed to make connection to backend: httpd-UDS`

The Error-Log of PHP-FPM says nothing.

The same thing happens, if I try to access the server directly via IP.

System-Details:

  • Debian 8
  • Apache 2.4
  • PHP7
  • PHP7-FPM

Where I have to serach for the Problem? If needed, config-files can be provided.

like image 340
Mlr Avatar asked Oct 11 '16 08:10

Mlr


3 Answers

If you are using PHP-FPM, the problem may also be that you need to start the PHP service.

Apache does not automatically stop the process, so you will either manually start it up or automatically on startup

For PHP 7.x (remember to include your version):

service php7.x-fpm start

For PHP 7:

service php7-fpm start

For PHP 5:

service php-fpm start

This will begin the FPM process for you.

Additionally, you may also want the process to startup on boot. To do that simply enter the following, of course considering your respective version.

systemctl enable php7.x-fpm
like image 140
Srivats Shankar Avatar answered Nov 16 '22 03:11

Srivats Shankar


I had same issue, on New server having php7.4 and these virtual host configuration files(located in /etc/apache2/sites-available/ directory) i migrated from server having php7.2.

When checked in detail i found

<FilesMatch \.php$>
     SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost/"
</FilesMatch>

Which then i replaced with

<FilesMatch \.php$>
     SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>

Basically updating php version and it worked fine after restarting apache2

like image 38
Dheeraj Thedijje Avatar answered Nov 16 '22 02:11

Dheeraj Thedijje


Steps I made in order to make it work on my host:

in /etc/apt/sources.list - added non-free to debian repository

apt update
apt install libapache2-mod-fastcgi
a2enmod fastcgi

(That made the "Invalid command 'FastCgiExternalServer' error, I encountered on a new installation", go away).

In Froxlor - "Settings" - "Froxlor VirtualHost settings": [X] Enable PHP-FPM for the Froxlor vHost If enabled, Froxlor will also be running under a local user.

I also removed all "Listen" entries from apache2's ports.conf

like image 1
epek Avatar answered Nov 16 '22 02:11

epek