Posts Tagged apache php fastcgi
apache-worker & php5 & mod_fastcgi
cd /usr/ports/www/apache22 make WITH_MPM=worker install clean
cd /usr/ports/lang/php5; make install clean
cd /usr/ports/www/mod_fastcgi make install clean
httpd.conf 中新增or把註解拿掉這兩行
LoadModule fastcgi_module libexec/apache22/mod_fastcgi.so
Include etc/apache22/extra/httpd-mpm.conf
編輯
/usr/local/etc/apache22/extra/httpd-mpm.conf
ThreadLimit 512
StartServers 1
MaxClients 512
MinSpareThreads 1
MaxSpareThreads 512
ThreadsPerChild 512
MaxRequestsPerChild 0
新增/usr/local/etc/apache22/Includes/fastcgi.conf
AddType application/x-httpd-php .php ScriptAlias /php-fcgi "/usr/local/bin/php-cgi" FastCgiServer "/usr/local/bin/php-cgi" -initial-env PHP_FCGI_CHILDREN=32 <directory /usr/local/bin > Options ExecCGI FollowSymLinks SetHandler fastcgi-script Order allow,deny Allow from all </directory> Action application/x-httpd-php /php-fcgi
ps
若之前php 是用php5_module來啟的話
記得把相關的php 都重編…
不然會一直出現
kernel: pid 86212 (php-cgi), uid 80: exited on signal 11
若一直出現這個就先把extension 都先拔掉
ref.
http://blog.wu-boy.com/2008/09/13/388/
http://blog.gslin.org/archives/2008/08/17/1624/
wens’s comment on http://blog.gslin.org/archives/2008/08/17/1624/