Lighttpd+PHP

Differences between revisions 6 and 11 (spanning 5 versions)
Revision 6 as of 2007-01-26 08:27:11
Size: 854
Editor: 195
Comment:
Revision 11 as of 2010-01-26 22:55:25
Size: 746
Editor: S01060014bf438b2a
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 *create files
 *edit config files
Line 9: Line 7:
Install the packages we need: (this may not be all, but these two will automatically download the rest as depencies) Install the packages we need: (this may not be all, but these two will automatically download the rest as dependencies)
Line 11: Line 9:
sudo apt-get install lighttpd php5 sudo apt-get install lighttpd php5-cgi
}}}
and enable the fastcgi module with
{{{
sudo lighty-enable-mod fastcgi
}}}
and reload the lighttpd daemon
{{{
sudo /etc/init.d/lighttpd force-reload
Line 14: Line 20:
To test the a php script you can put a phpinfo script [[http://php.net/manual/en/function.phpinfo.php]] named index.php into /var/www and check it out at [[http://localhost/index.php]]
Line 15: Line 22:

edit the config file '''/etc/lighttpd/lighttpd.conf''' and remove the # in:
{{{
#include "mod_fastcgi.conf"
}}}


now add the file '''/etc/lighttpd/mod_fastcgi.conf'''
{{{
 server.modules += ("mod_fastcgi")
 fastcgi.server = ( ".php" =>
   ( "localhost" =>
     (
       "host" => "127.0.0.1",
       "port" => 1026,
       "bin-path" => "/usr/bin/php-cgi"
     )
   )
 )
}}}


source: http://gentoo-wiki.com/HOWTO_Lighttpd
----
CategoryLookMergeDelete

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

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

sudo apt-get install lighttpd php5-cgi

and enable the fastcgi module with

sudo lighty-enable-mod fastcgi 

and reload the lighttpd daemon

sudo /etc/init.d/lighttpd force-reload

To test the a php script you can put a phpinfo script http://php.net/manual/en/function.phpinfo.php named index.php into /var/www and check it out at http://localhost/index.php


CategoryLookMergeDelete

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