I have such virtual host settings
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<FilesMatch .php$>
SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://localhost/"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
phpinfo() shows that my site has a version of php 5.6. All right!
Now I am trying to restrict the rights with Mod_Ruid2. I added the following to my virtual host
RDocumentChRoot /var /www/html
<Directory "/www/html/">
Require all granted
RMode config
RUidGid admin0 admin0
</Directory>
after trying to get to the site I see an error in the logs
[Sun Oct 13 16:09:02.492117 2019] [proxy:error] [pid 13571] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php/php5.6-fpm.sock (*) failed
[Sun Oct 13 16:09:02.492194 2019] [proxy_fcgi:error] [pid 13571] [client 192.168.0.110:47622] AH01079: failed to make connection to backend: httpd-UDS
Tell me, what am I doing wrong?
5
Answers
I’ve just faced the same issue while trying to run apache(2.4) + php(7.2) over CentOS 8.
To solve this, I had to launch a service called “php-fpm” (sudo systemctl enable –now php-fpm), that led me to another error:
That was caused by the folder /run/php-fpm not existing.
After that, just launched again php-fpm, this time without errors and apache+php worked like a charm.
Note that there is a small difference between your error and mine, the paths are a bit different. Instead of “/run/php-fpm/” you should create “/var/run/php/”.
Hope this helps
i had same issue on
CentOS 8
andApache 2.4.37
and after many hour research in internet , i can’t found any solution for unix domain proxy.i don’t know this is a bug or bad document?
for resolve this problem only you must be replace
proxy:unix:/YOUR_PATH
withproxy:unix://YOUR_PATH
.notice :
...|fcgi://localhost/
must be exists.after your change this setting the new problem appears :
File not found.
this error is good because we were able connected to
php-fpm
fromapache
.i think this problem is bug. please see this link.
https://bugs.php.net/bug.php?id=55322
for resolve this problem you must be implement this structure :
httpd.conf
/etc/php-fpm.d/example.com.conf
I faced the same issue, in my case I could fix it by restarting PHP fpm service, by running code:
OS: centos
Webserver: nginx
I’ve just faced the same issue, I commented this part of code in my drupal.con (could be another one for you)
And the website just show up. Apparently I did not need it on this serveur (redhat 7), but I needed it in my CentOS for the same project.
Please note I had this come up today and I found the solution on serverfault. pfrenssen’s answer specifically. Note the field name tripped me up for an hour as
listen.group
andgroup
both exist. I then needed to comment a linelisten.acl_users
out which was uncommented by default. It important to note that thewww-data
user I am using is the user I have predefined (non-default) apache user. I believe this to be the underlying cause. Below is my one liner to change these values. Usecp /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.conf.default
first to help test as sed modifies the file in place.