Php-fpm (New fast CGI server)

For mLinux versions 4.0 and higher:

In mLinux 4, the php-fpm server module is the new Fast CGI server. It has better performance than the old fast-cgi serever.

/etc/lighttpd.conf now has a section for php-fpm, which is the new fast-cgi server.

Add the mod_fastcgi server module to lighttpd by uncommenting mod_fastcgi:

server.modules              = (
#                               "mod_setenv",                                  
#                               "mod_fastcgi",                                 
#                               "mod_proxy",

Uncomment the following section (this is new):

#fastcgi.server             = ( ".php" =>                                      
#                               ( "localhost" =>                               
#                                 (                                            
#                                   "socket" => "/var/run/php-fpm.socket",     
#                                   "broken-scriptfilename" => "enable"        
#                                 )                                            
#                               )                                              
#                            )

Activate the php-fpm server by changing no to yes in /etc/default/php-fpm:

# set to "yes" or "no" to control starting on boot

Create a test example /www/pages/hello.php:

<h1>It Works!</h1>
echo "It works php";

Restart the servers:

mtcdt:~$ sudo /etc/init.d/lighttpd restart
Restarting Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 1835)
mtcdt:~$ sudo /etc/init.d/php-fpm restart 
Gracefully shutting down php-fpm . done
Starting php-fpm  done

In a browser, enter the IP and name of the PHP file:

You should see:

It Works!
It works php