Applicable to:
- Plesk for Linux
Symptoms
-
The domain example.com that displays one of the following errors when opened in a browser:
PLESK_INFO: 503 Service Unavailable
PLESK_INFO: 502 Bad Gateway
Nginx -
Errors that are similar to the following appear in the domain's Apache error log
/var/www/vhosts/system/example.com/logs/error_log
:CONFIG_TEXT: [proxy:error] [pid 15065:tid 139826443527936] (111)Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /data/vhosts/system/example.com/php-fpm.sock (*) failed
[proxy_fcgi:error] [pid 15065:tid 139826443527936] [client 203.0.113.2:50232] AH01079: failed to make connection to backend: httpd-UDS - Errors that are similar to the following appear in the domain's nginx error log:
CONFIG_TEXT: 2024/02/12 10:31:43 [error] 26259#0: *595 connect() to unix:/var/www/vhosts/system/example.com/php-fpm.sock failed (111: Connection refused) while connecting to upstream, client: 2001:db8:f61:a1ff:0:0:0:80, server: example.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/www/vhosts/system/example.com/php-fpm.sock:", host: "example.com"
Cause
The PHP configuration file that should exist for the PHP version that the affected domain is set to use is missing from the /opt/plesk/php/X.X/etc/php-fpm.d/
directory.
Note: This can often occur if a PHP handler was removed entirely from Plesk, as explained in this article.
Resolution
Regenerate the PHP configuration files for the domains on your server by executing the following steps:
- Log into Plesk
- Go to Domains > example.com > Dashboard > PHP, change the used PHP handler to any different one and press Apply
- Change the PHP handler version back to the original one and press Apply
-
Log into the server via SSH
Note: If direct SSH access to the server is not possible, contact server administrator for further assistance.
-
Execute the following command to update settings on all domains:
# /usr/local/psa/bin/php_settings -u
- Execute the command to get a list of all installed PHP handlers:
# plesk bin php_handler --list | grep -E plesk.*fpm | awk -F" " '{ print $1 }'
plesk-php74-fpm
plesk-php81-fpm
plesk-php82-fpm
plesk-php83-fpm -
Restart the PHP handler service for all of the used PHP handlers, for example:
# systemctl restart plesk-php74-fpm
# systemctl restart plesk-php81-fpm
# systemctl restart plesk-php82-fpm
# systemctl restart plesk-php83-fpm
Comments
0 comments
Please sign in to leave a comment.