listen = /run/php/php8.1-fpm.sock
listen = /var/run/php8.1-fpm.sock
/etc/apache2/sites-available/
<FilesMatch \.php$>
# 2.4.10+ can proxy to unix socket
SetHandler "proxy:unix:/var/run/php/php8.1-fpm.sock|fcgi://localhost/"
# Else we can just use a tcp socket:
#SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
sudo ln -nfs /etc/apache2/sites-available/localhost.conf /etc/apache2/sites-enabled/localhost.conf
sudo apachectl configtest && apachectl restart
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enconf php8.1-fpm