Apache with php-fpm: Difference between revisions

From Alpine Linux
No edit summary
Line 1: Line 1:
===Apache and php===
===Apache and php===
There are 4 different ways to use php with apache
* cgi
* cgi
* fcgi
* fcgi
* mod_php
* mod_php
* php-fpm
* php-fpm
Here is a comparison why [http://php-fpm.org/about fpm] is the better way. In short it works with apache event mpm, has better security, can have per vhost pool configuration, better process management, better security, ....
When used with apache event mpm, it's the most memory efficient setup that you can achieve with apache + php. Whether it's better than nginx + php-fpm depends on your setup, contents and preference.


===Step by step===
===Step by step===

Revision as of 07:39, 17 September 2014

Apache and php

There are 4 different ways to use php with apache

  • cgi
  • fcgi
  • mod_php
  • php-fpm

Here is a comparison why fpm is the better way. In short it works with apache event mpm, has better security, can have per vhost pool configuration, better process management, better security, .... When used with apache event mpm, it's the most memory efficient setup that you can achieve with apache + php. Whether it's better than nginx + php-fpm depends on your setup, contents and preference.

Step by step

install apache and php-fpm

sudo apk add apache php-fpm