Lighttpd+PHP

Differences between revisions 11 and 12
Revision 11 as of 2010-01-26 22:55:25
Size: 746
Editor: S01060014bf438b2a
Comment:
Revision 12 as of 2010-10-26 09:44:32
Size: 805
Editor: 0xbcb2ea3d
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
and enable the fastcgi module with and enable the fastcgi module and the php configuration with
Line 14: Line 14:
sudo lighty-enable-mod fastcgi-php
Line 20: Line 21:
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]] 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.

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 and the php configuration with

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

and reload the lighttpd daemon

sudo /etc/init.d/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)