Saturday, April 6, 2013

Switching to worker mpm from prefork apache 2 on ubuntu


I'm on ubuntu and according to some tutorials, the following lines would do all the tricks:
apt-get install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm php5-gd
a2enmod actions fastcgi alias
Then you setup configuration in /etc/apache2/conf.d/php5-fpm.conf:
<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>
After all these, restart:
service apache2 restart && service php5-fpm restart
 
Done! 

No comments:

Post a Comment