Description

lighttpd is a secure, fast, compliant, and very flexible web-server that has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect webserver-software for every server that suffers load problems.

For more info go to http://www.lighttpd.net/

1.4 Releases

The 1.4 series is the latest series available in the repositories. This will guide you through installing Lighttpd and PHP5 on Karmic (9.10) or Lucid (10.04).

Lighttpd

To install lighttpd, simply run in a terminal:

sudo apt-get install lighttpd

This will automatically install Lighttpd, start it, and set it to run at boot.

You can access your web server by going to "http://localhost" in any web browser on the local machine, or "http://serverip" (where serverip is the IP address of the computer running lighttpd) from any other computer on the network.

The root of the web server is at "/var/www/html" and the configuration file is "/etc/lighttpd/lighttpd.conf".

Enabling User Directories

With user directories enabled, each user can have their own web directory in their home folder.

To enable user directories, run in a terminal:

sudo lighttpd-enable-mod userdir

Then reload the configuation:

sudo service lighttpd reload

Now users can place files in a "public_html" folder in their home directory to have them hosted on the web server.

For example, the user "joe" would put his files in "/home/joe/public_html" and access them at "http://serverip/~joe".

PHP

Install "php5-cgi":

sudo apt-get install php5-cgi

Enable the fastcgi module included with lighttpd:

sudo lighttpd-enable-mod fastcgi fastcgi-php

Reload the configuration with:

sudo service lighttpd reload

Create the file "/var/www/info.php" and put in it:

<?php phpinfo(); ?>

Browse to "http://serverip/info.php", and if you get a nice page showing all the PHP settings, it worked!

1.5 Releases

This will guide you through the steps needed to deploy a ready for production LLMP (where second "L" comes from Lighttpd) server.

Getting 1.5 (L+L)

lighttpd 1.5 milestone is currently in intensive development and there are no official builds available directly from the standard repositories. To get it available on you server you should add Stefan Bühler's PPA archives. --note I would advise against this, as it has not been updated since Jan 2009.

Edit /etc/apt/sources.list with your favorite editor, and append to it the following line:

deb http://ppa.launchpad.net/stbuehler/ppa/ubuntu intrepid main

(i) Don't worry if your system version is hardy, the repository won't upgrade the full system, only the required packages!!!

Now add Stefan's key from the Ubuntu keyserver:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xEA5C35785A43ED73

Once you finished, use your favorite package manager and update and install lighttpd1.5:

sudo apt-get install lighttpd1.5 lighttpd1.5-mod-magnet

Info (!) The last package will be used for mod_rewrite rules.

This should be enough to get lighttpd on your machine.

Vhosts

MYSQL + PHP (LL+MP)

lighttpd (last edited 2015-05-21 21:11:28 by 108-212-116-52)