Apache with PHP-FPM not working

apache-2.4php5

I am following this and this article to setup apache2 and php5-fpm under Ubuntu 14.04, but it always return a HTTP 403 when I run phpinfo(), how do I fix it?

I didn't edit the virtual host configuration file, but I add a file under /etc/apache2/conf-available call php5-fpm.conf.

php5-fpm.conf:

<IfModule mod_fastcgi.c>
    AddHandler php5-fcgi .php
    Action php5-fcgi /php5-fcgi
    Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
    FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
</IfModule> 

Best Answer

I needed to run to make it working:

a2enconf php7.4-fpm

https://www.linuxbabe.com/ubuntu/enable-http-2-apache-ubuntu-20-04