Website shows 503 Service Unavailable if PHP-FPM support is enabled: AH01079: failed to make connection to backend

Created:

2017-03-02 10:15:57 UTC

Modified:

2017-08-08 13:08:53 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website shows 503 Service Unavailable if PHP-FPM support is enabled: AH01079: failed to make connection to backend

Applicable to:

  • Plesk for Linux

Symptoms

  • Website is unavailable if PHP-FPM support is enabled:

    503 Service Unavailable.
    
  • In domain's web server error log the following entries:

    # tail -fn0 /var/www/vhosts/system/example.com/logs/error_log [proxy:error] [pid 12408:tid 140554054616832] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/example.com/php-fpm.sock (*) failed [proxy_fcgi:error] [pid 12408:tid 140554054616832] [client 203.0.113.2:55499] AH01079: failed to make connection to backend: httpd-UDS

Cause

Permissions for /var/www/vhosts/system/ directory and sub-directories are insufficient or SELinux policies absent.

Resolution

Check the permissions and make sure that they are correct:

# stat /var/www/vhosts/system/
File: '/var/www/vhosts/system/'
Size: 12288 Blocks: 24 IO Block: 4096 directory
Device: 5990b621h/1502656033d Inode: 535343 Links: 6
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

 

# stat /var/www/vhosts/system/example.com/
File: '/var/www/vhosts/system/example.com/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 5990b621h/1502656033d Inode: 281291 Links: 7
Access: (0711/drwx--x--x) Uid: ( 0/ root) Gid: ( 1002/ psaserv)

 

# ls -l /var/www/vhosts/system/example.com/
total 20
drwxr-x--- 2 root psaserv 4096 Feb 27 04:53 conf
drwxr-xr-x 2 root root 4096 Feb 11 11:45 etc
drwx------ 2 psaadm root 4096 Mar 2 03:53 logs
drwx--x--- 2 root psaserv 4096 Feb 14 23:14 pd
srw-rw---- 1 root psaserv 0 Mar 2 16:28 php-fpm.sock
dr-xr-x--- 6 root psaserv 4096 Feb 11 11:45 statistics

If steps above not helped, check this article PHP-FPM enabled websites are down. Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket

Have more questions? Submit a request
Please sign in to leave a comment.