Lighttpd+PHP
Differences between revisions 9 and 12 (spanning 3 versions)
880
Comment: converted to 1.6 markup
|
805
|
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 13: | Line 11: |
edit the config file '''/etc/lighttpd/lighttpd.conf''' and add: |
and enable the fastcgi module and the php configuration with |
Line 18: | Line 13: |
include "mod_fastcgi.conf" | sudo lighty-enable-mod fastcgi sudo lighty-enable-mod fastcgi-php }}} and reload the lighttpd daemon {{{ sudo /etc/init.d/lighttpd force-reload |
Line 21: | Line 21: |
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 22: | Line 27: |
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 }}} |
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.
Lighttpd+PHP (last edited 2010-10-26 09:48:54 by 0xbcb2ea3d)