Archive for October, 2015

9
Oct

apache MPM worker

   Posted by: admin    in Mẹo vặt của hiếu râu



rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
cd /tmp/
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

vim /etc/httpd/conf.d/fastcgi.conf

FastCgiWrapper Off

<IfModule mod_fastcgi.c>
    AddHandler php5-fcgi .php
    Action php5-fcgi /php5-fcgi
    Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
    DirectoryIndex index.php
    FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
</IfModule>

mkdir -p /usr/lib/cgi-bin

vim /etc/php-fpm.d/www.conf 

listen = /var/run/php5-fpm.sock
beware of sock permission ( nobody 666 )
vi /etc/sysconfig/httpd
HTTPD=/usr/sbin/httpd.worker