วันพุธที่ 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.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น