Articles in this section

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

Plesk for Linux kb: technical

Symptoms

  • FPM application handler is set in Domains > example.com > PHP for a website and it is not accessible with the following error:

    CONFIG_TEXT: 502 Bad Gateway

    CONFIG_TEXT: 503 Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

  • The following error is in /etc/apache2/logs/error_log or in /var/www/vhosts/example.com/logs/error_log:

    CONFIG_TEXT: (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

  • 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::---

Cause

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

Resolution

  1. Connect to the server via SSH
  2. Disable extended ACL rules for /var/www/vhosts/system/ directory

    # setfacl -Rb /var/www/vhosts/system/

If it did not fix the issue, change PHP version for the domain:

  1. Log into Plesk
  2. Go to Domains > example.com > PHP Settings
  3. Select other PHP version
  4. Press OK
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.