Table of Contents

, ,

Use faster php-fpm instead of libapache2-mod-php

Change php version to php7.3 for Buster.

Install fpm and remove libapache

apt install libapache2-mod-fcgid php7.0-fpm
apt purge libapache2-mod-php7.0

Enable/disable modules

a2dismod mpm_prefork 
a2enmod mpm_event actions fcgid proxy_fcgi alias setenvif ssl rewrite
a2enconf php7.0-fpm
systemctl restart apache2

Test setup

Create file phpinfo.php in DocumentRoot with this content:

<?php phpinfo( ); ?>

then visit http://yoursite.com/phpinfo.php

Then line with “Server API” should have “FPM/FastCGI”.

Tested on

See also

References