This post assumes you have successfully installed PHP-FPM and have confirmed it is running on the server:
# systemctl status php7.2-fpm.service
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-08-13 03:40:43 UTC; 14min ago
Configured on the site:
But still getting this:
The good news is you are actually pretty close, and it’s actually something you missed in your site config file.
Go back and verify the port you’re listening on (e.g., vim /etc/php/7.2/fpm/pool.d/[pool name].conf). For instance, in my case it was:
listen = 127.0.0.1:9001
But my Apache config was looking for:
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://127.0.0.1:9000/"
</FilesMatch>
A simple update to:
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://127.0.0.1:9001/"
</FilesMatch>
And a restart of the web server:
systemctl restart apache2.service
Should do the trick, and get you situated again.