This site is a static archive of the Aegir community site. Documentation has moved to Other community resources can be found on the Contacting the community page.
Skip navigation

Experimental: Aegir 2 on Ubuntu 12.04 with apache, php-fpm


Experimental: Aegir 2 on Ubuntu 12.04 with apache, php-fpm

These notes describe a possible way of installing Apache with fastcgi using php5-fpm. The below configuration works but is experimental.

On a Ubuntu 12.04 box:

Install Aegir2 from Debian packages

Follow Below is a shortened form.

Add the Aegir package "Software Source" repository:

echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list
wget -q -O- | sudo apt-key add -

Install aegir2:

sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_secure_installation
sudo apt-get install aegir2

If the installation fails, it might be that your FQDN is not set or your postfix is not configured.

Verify your aegir site is working

Navigate your browser to the FQDN of your aegir server. You need to see the "Welcome to Aegir" page.

Modify the configuration to use fastcgi / php5-fpm

Edit /etc/apt/sources.list and enable the multiverse repository (it's needed for the libapache2-mod-fastcgi package).

Then install php5-fpm and make apache use it:

sudo apt-get update
sudo apt-get install php5-fpm libapache2-mod-fastcgi
sudo apt-get --purge remove libapache2-mod-php5

Modify /etc/php5/fpm/pool.d/www.conf Make it listen on socket, instead of IP:

;listen =
listen = /var/run/php-fpm.sock

Create /etc/apache2/conf.d/php-fpm.conf with this content:

ScriptAlias /php5.fastcgi /var/www/fastcgi
FastCGIExternalServer /var/www/fastcgi -socket /run/php-fpm.sock
AddHandler php-fastcgi .php
Action php-fastcgi /php5.fastcgi virtual

Options FollowSymLinks ExecCGI

<Directory /var/www/fastcgi>
  Options ExecCGI FollowSymLinks
  SetHandler fastcgi-script
  Order allow,deny
  Allow from all

Enable apache modules:

sudo a2enmod actions alias fastcgi

Restart php5-fpm and apache to load the new configs:

sudo service php5-fpm restart
sudo service apache2 restart

Verify that you can still reach your Aegir site

Navigate your browser to the FQDN of your aegir server. This time, you are using php5-fpm. Verify e.g. via phpinfo().

Page author: Marji Cermak,

Need help?


The notebook section provides a way for you to store and share information with your group members. With the book feature you can:

  • Add book pages and organize them hierarchically into different books.
  • Attach files to pages to share them with others.
  • Track changes that others have made and revert changes as necessary.
  • Archive books that are no longer of interest to the group. Archived books can be reactivated later if needed.