lighttpd enable php with fast cgi

Install the php5 cgi package

apt-get install php5-cgi

I'd to install the php mysql support, too.

apt-get install php5-mysq

Configure the Lighttpd by editing to config file


At first we need to enable the mod_fastcgi

server.modules = (

then we configure fastcgi to handle php file extensions

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"

Restart the daemon for changes to take effekt.

/etc/init.d/lighttpd force-reload

Done. Did it work for you? Drop a comment.

No comments: