How To Use Apache mpm-worker on Virtualmin – Ubuntu 14.04

By | August 10, 2015


Apache mpm-prefork is the default setting on Virtualmin. We can change to mpm-worker to slightly improve the Apache performance.
Please install these package. You will need to update your sources.list to ensure that the multiverse repository is enabled and then do an apt-get update before attempting the install.

sudo apt-get install libapache2-mod-fastcgi php5-fpm

Then add this line of code on file

    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

Then enable the new mods and config:

a2dismod php5
a2enmod actions fastcgi alias
a2enconf php5-fpm
service apache2 reload

The new Apache should be up and running.