Make sure php support fastcgi
Type any one of the following command to verify that php support fastcgi$ php -v
Output:
PHP 5.0.4 (cli) (built: Nov 8 2005 08:27:12) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend TechnologiesOR
$ php-cgi -v
Output:
PHP 5.0.4 (cgi-fcgi) (built: Nov 8 2005 08:25:54) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend TechnologiesYou must get string cgi-fcgi. Next find out full path to php-cgi or php binary:
$ which php-cgi
Output:
/usr/bin/php-cgiOpen lighttpd configuration file:
# vi /etc/lighttpd/lighttpd.conf
First add the module mod_fastcgi (lighttpd provides an interface to a external programs that support the FastCGI interface via this module). Make sure your server.modules loades mod_fastcgi:
server.modules = ( "mod_access", "mod_accesslog", "mod_fastcgi", "mod_rewrite", "mod_auth" )Now add following lines to configuration:
fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket" )))Save the configuration and close all the files. Restart the lighttpd:
# /etc/init.d/lighttpd restart
0 comments:
Post a Comment