แสดงบทความที่มีป้ายกำกับ fcgi แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ fcgi แสดงบทความทั้งหมด

วันพุธที่ 10 มีนาคม พ.ศ. 2553

Configuring gentoo apache with fcgi

mod php and worker are not stable as PHP official page.

Gentoo user might not aware this because we can compile PHP with threads use flag without realizing the warning.

Before get start with apache-worker fcgid and php. You need the following :
1) installed PHP with cgi use flag.
2) installed mod_fcgid (emerge mod_fcgid)

PHP configuration :
- modify /etc/php/cgi-php5/php.ini to suite your need.

apache configuration :
- modify /etc/apache2/modules.d/20_mod_fcgid.conf adding the following in
AddHandler fcgid-script .php .fcgi
DefaultInitEnv PHPRC "/etc/php/cgi-php5"

IdleTimeout 60
BusyTimeout 120
ProcessLifeTime 360
SpawnScoreUpLimit 2100
MaxProcessCount 2100
DefaultMaxClassProcessCount 2100
IPCConnectTimeout 120
IPCCommTimeout 120

FCGIWrapper /usr/bin/php-cgi .php

Please change the /usr/bin/cgi/ to your path. And don't forget to add +ExecCGI to option directive.

- edit /etc/conf.d/apache2 add -D FCGID to APACHE2_OPTS

restarting apache.

วันศุกร์ที่ 5 มีนาคม พ.ศ. 2553

apache with fcgid

Once, I used gentoo with apache(worker) + phpmod as a webserver. After switching to ubuntu, I've found that phpmod is not stable with apache(worker), this is not a problem with gentoo b'coz u can customize everything by yourself.

Up to this point ,there are 2 choice for ubuntu apache works with php
1) use apache prefork + phpmod
2) use apache worker + cgi + php

More description about fcgid/fastcgi http://www.seaoffire.net/fcgi-faq.html

I found the following study show that fcgid might be a good choice. And, it is.
http://2bits.com/articles/apache-fcgid-acceptable-performance-and-better-resource-utilization.html

For fcgid reference for apache :
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html