Article Contents
Step1. Install Apache2 using the command:
apt-get install apache2-mpm-worker
Now you cand navigate from your browser to http://your-ip to check if Apache2 is working (you should see the Apache2 default page with message: It works).
Step2. Install PHP5-FPM.
We will make PHP5 work in Apache2 through PHP-FPM and Apache2 mod_fastcgi module.
We need to install apache mod-fastcgi first:
apt-get install libapache2-mod-fastcgi php5
Now install php-fpm:
echo “deb http://packages.dotdeb.org stable all” >> /etc/apt/sources.list
echo “deb-src http://packages.dotdeb.org stable all” >> /etc/apt/sources.list
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg |apt-key add -
apt-get update
apt-get install php5-fpm
Step3. Enable the Apache2 modules:
a2enmod actions fastcgi alias
and restart Apache2 server:
/etc/init.d/apache2 restart
Step4. Make Apache work with PHP-FPM:
Put the following section between <VirtualHost> and </VirtualHost> in your virtualhost file:
vim /etc/apache2/sites-enabled/000-default
<IfModule mod_fastcgi.c>
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 -host 127.0.0.1:9000 -pass-header Authorization
</IfModule>
Restart apache again.
/etc/init.d/apache2 restart
Step5. Verify if PHP-FPM is working:
Create one phpinfo file in the document root /var/www
echo “<?php phpinfo(); ?>” > /var/www/phpinfo.php
and navigate to http://your-ip/phpinfo.php and check for PHP-FP.
Enjoy















I have do it exactly this tutorial on my private Root-Server with Debian but it shows me in the phpinfo(); data table no PHP5-FPM. What i have made wrong?
did you not get any errors?