Quantcast
Viewing all articles
Browse latest Browse all 10

Trusty Tahr apache2, php5-fpm and event MPM

apt-get install -y --force-yes apache2 php5-fpm  libapache2-mod-fcgid php5-cgi
sed -i "s/listen =.*/listen = 127.0.0.1:9000/" /etc/php5/fpm/pool.d/www.conf
a2dismod mpm_prefork
a2enmod mpm_event

echo -e "<Directory /var/www>\n\
AddHandler fcgid-script .php\n\
FCGIWrapper /usr/lib/cgi-bin/php5 .php\n\
Options +ExecCGI\n\
</Directory>\n\
\n\
# If you have Aliases provide php support for them (Here we provide php support for scripts in /usr/share's subdirectories)\n\
Alias /aptitude /usr/share/doc/aptitude/html/en\n\
Alias /apt /usr/share/doc/apt-doc\n\
\n\
<Directory /usr/share>\n\
AddHandler fcgid-script .php\n\
FCGIWrapper /usr/lib/cgi-bin/php5 .php\n\
Options ExecCGI FollowSymlinks Indexes\n\
</Directory>"\n\
> /etc/apache2/conf-available/eventphp.conf

a2enconf eventphp
service apache2 restart

Make sure libapache2-mod-php5 is NOT installed

phpinfo file for testing:

echo "<?php phpinfo();" >> /var/www/html/info.php

Tips

Show MPM module currently used:

apachectl -V | grep -i mpm

View the available mods

ls /etc/apache2/mods-available/mpm*

Edit the event MPM config:

vim /etc/apache2/mods-available/mpm_event.conf

Configuring phpmyadmin

vim vim /etc/apache2/conf-enabled/phpmyadmin.conf

change Options FollowSymLinks to Options +FollowSymLinks +ExecCGI


Viewing all articles
Browse latest Browse all 10

Trending Articles