Lighttpd+PHP

Differences between revisions 6 and 7
Revision 6 as of 2007-01-26 08:27:11
Size: 854
Editor: 195
Comment:
Revision 7 as of 2008-05-07 16:33:27
Size: 849
Editor: host74-48-static
Comment: Just used it on my Gutsy. I'm going to update do 8.x and try again.
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
sudo apt-get install lighttpd php5 sudo apt-get install lighttpd php5-cgi
Line 16: Line 16:
edit the config file '''/etc/lighttpd/lighttpd.conf''' and remove the # in: edit the config file '''/etc/lighttpd/lighttpd.conf''' and add:
Line 18: Line 18:
#include "mod_fastcgi.conf" include "mod_fastcgi.conf"
Line 28: Line 28:
       "host" => "127.0.0.1",
       "port" => 1026,
       "bin-path" => "/usr/bin/php-cgi"
       "bin-path" => "/usr/bin/php5-cgi",
       "socket" => "/tmp/php.socket"
Line 36: Line 35:

source: http://gentoo-wiki.com/HOWTO_Lighttpd
and reload the lighttpd daemon
{{{
sudo /etc/init.d/lighttpd reload
}}}

This is a how-to to on installing and setting up lighttpd and php on dapper. Lighttpd or "lighty" is a webserver with a very low use of resources.

required abilities:

  • open a terminal
  • create files
  • edit config files

Install the packages we need: (this may not be all, but these two will automatically download the rest as depencies)

sudo apt-get install lighttpd php5-cgi

edit the config file /etc/lighttpd/lighttpd.conf and add:

include "mod_fastcgi.conf"

now add the file /etc/lighttpd/mod_fastcgi.conf

 server.modules += ("mod_fastcgi")
 fastcgi.server = ( ".php" =>
   ( "localhost" =>
     (
       "bin-path" => "/usr/bin/php5-cgi",
       "socket" => "/tmp/php.socket"
     )
   )
 )

and reload the lighttpd daemon

sudo /etc/init.d/lighttpd reload

Lighttpd+PHP (last edited 2010-10-26 09:48:54 by 0xbcb2ea3d)