Tuesday, January 17, 2012

Configuring php handler as FastCGI

Sponsored Links

Edit the apache configuration file as follows
vi /etc/httpd/conf/httpd.conf

####    PHP as fast cgi
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php.fcgi
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

Restart the apache
 /etc/init.d/httpd restart

How to check:

Create an info.php file
vi info.php
<?php
phpinfo();
?>

http://domain.com/info.php
Check the Server API field

If  php is handled by Apache module it will show as
Server API  :  Apache 2.0 Handler

If  php is handled by FastCGI it will show as
Server API  : CGI/FastCGI
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.