Website fails to load with 502 Bad Gateway error: (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket failed

Refers to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:52:43 UTC

Modified:

2017-02-20 07:14:49 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website fails to load with 502 Bad Gateway error: (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket failed

Symptoms

PHP-FPM handler is set for a website and it is not accessible with the following error:

502 Bad Gateway

The following error is in /etc/apache2/logs/error_log :

(13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/example.com/php-fpm.sock (127.0.0.1) failed

Cause

Extended ACL rules are set for /var/www/vhosts/system/ directory and subdirectories, which overwrite correct permissions.

Socket file has incorrect permissions (it should be 0660 ):

# getfacl /var/www/vhosts/system/example.com/php-fpm.sock
getfacl: Removing leading '/' from absolute path names
# file: var/www/vhosts/system/example.com/php-fpm.sock
# owner: root
# group: psaserv
user::rw-
group::---
other::---

Resolution

Disable extended ACL rules for /var/www/vhosts/system/ directory

# setfacl -Rb /var/www/vhosts/system/
Have more questions? Submit a request
Please sign in to leave a comment.