cd /usr/ports/www/lighttp/
make install clean
config /usr/local/etc/lighttpd.conf:
server.modules =(
.....
#enable mod_fastcgi
"mod_fastcgi",
.....
)
.....
#enable PHP
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/local/bin/php-cgi"
)
)
)
Notice:replace “php-cgi-cgi” to “php-cgi”
Then create tmp folder:
mkdir /var/run/lighttpd
chown www:www /var/run/lighttpd