High performance Apache with mpm-event and PHP-FPM

Table of Content

When design the high perfomance website sytem, we have many options : Apache or Nginx, PHP or PHP-FPM….

In this article, i will introduce you how we can build a high performance system with Apache 2.4, MPM-Event with PHP-FPM.

Install

Assuming that you’re starting with a basic LAMP stack, to get Event MPM and PHP-FPM up and running on Ubuntu 14.04 first install these packages:

Configuration

For php-fpm, after install we will have main config file /etc/php5/fpm/php-fpm.conf.

In this file you will see the line at the bottom :

We create a new config file call www.conf on this directory and place our config :

Please take a look that :

Those settings are very important for increase perfomance of our web server.

Next, we edit a setting file /etc/apache2/conf-available/php5-fpm.conf for PHP-FPM working with Apache through libapache2-mod-fastcgi

Next, we edit config file for mpm-event at /etc/apache2/mod-available/mpm-event.conf :

Please note that those setting are very important for scale website.

Setup and running

Our last step is make them running all :

With this design, our web server can handle about 4000 CCU.

Leave a Reply

Your email address will not be published. Required fields are marked *