{{tag>apache fpm php}} ====== 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: then visit http://yoursite.com/phpinfo.php Then line with "Server API" should have "FPM/FastCGI". ====== Tested on ====== * Debian 9 Stretch * Debian 10 Buster ====== See also ====== ====== References ====== * https://www.basezap.com/difference-php-cgi-php-fpm/ * https://localhorst.org/http-2-0-debian-9-apache-2-4-umstellung-auf-php-fpm/ * https://websiteforstudents.com/how-to-run-apache2-with-php7-2-fpm-on-ubuntu-16-04-17-10-18-04/