yishan.io
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Php5 Fpm

php5-fpm

Installation

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

Activation modules

sudo a2enmod actions fastcgi alias

Backup du fichier de conf initial

cp /etc/apache2/mods-enabled/fastcgi.conf /etc/apache2/mods-enabled/fastcgi.conf.backup

modification du fichier de conf’

sudo vim /etc/apache2/mods-enabled/fastcgi.conf

<IfModule mod_fastcgi.c>

  AddHandler fastcgi-script .fcgi

  #FastCgiWrapper /usr/lib/apache2/suexec

  FastCgiIpcDir /var/lib/apache2/fastcgi

  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




  <Directory /usr/lib/cgi-bin>

      Require all granted

  </Directory>




</IfModule>

test de la conf’ apache et redémarrage des services

sudo apache2ctl configtest
sudo service apache2 restart
sudo service php5-fpm restart