User Tools

Site Tools


wiki:use_faster_php-fpm_instead_of_libapache2-mod-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:

<?php phpinfo( ); ?>

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

wiki/use_faster_php-fpm_instead_of_libapache2-mod-php.txt · Last modified: 2021/04/10 15:35 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki