Lighttpd+PHP

Differences between revisions 5 and 13 (spanning 8 versions)
Revision 5 as of 2007-01-26 08:26:02
Size: 850
Editor: 195
Comment:
Revision 13 as of 2010-10-26 09:48:54
Size: 786
Editor: 0xbcb2ea3d
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
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.
This is a how-to to on installing and setting up lighttpd and PHP on Maverick.
[[http://www.lighttpd.net/|Lighttpd]] or "lighty" is a webserver with a very low use of resources.
Line 4: Line 4:
required abilities:
 *open a terminal
 *create files
 *edit config files
Line 9: Line 5:
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 7:
sudo apt-get install lighttpd php5 sudo apt-get install lighttpd php5-cgi
}}}
Enable the fastcgi module and the php configuration with
{{{
sudo lighty-enable-mod fastcgi
sudo lighty-enable-mod fastcgi-php
}}}
Reload the lighttpd daemon
{{{
sudo service lighttpd force-reload
Line 14: Line 19:
To test if it's working create the file `/var/www/index.php` with the following contents:
{{{
<?php phpinfo(); ?>
}}}
and check out [[http://localhost/index.php]] in your browser.
Line 15: Line 25:

edit the config file '''/etc/lighttpd/lighttpd.conf''' and add the line
{{{
#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 Maverick. Lighttpd or "lighty" is a webserver with a very low use of resources.

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

Enable the fastcgi module and the php configuration with

sudo lighty-enable-mod fastcgi 
sudo lighty-enable-mod fastcgi-php

Reload the lighttpd daemon

sudo service lighttpd force-reload

To test if it's working create the file /var/www/index.php with the following contents:

<?php phpinfo(); ?>

and check out http://localhost/index.php in your browser.


CategoryLookMergeDelete

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