Contact Sales Sitemap Customer Login

Install and Configure lighttpd

Contents

Description of Package

Lighttpd is a lightweight HTTP server. It functions much the same way Apache does, but uses up far less system resources, and in most configurations, is faster. Lighttpd is used by several popular Web 2.0 sites such as YouTube, Wikipedia, and Meebo.


Installation

The easiest, and most widely used method of installation is via your chosen distribution's package management system. Most major distributions have lighttpd in their repositories, or other fairly easy ways of obtaining it.


lighttpd yum Installation

yum is the preferred installation method for RedHat Enterprise Linux, CentOS, and Fedora Core.

If yum does not return any results, you will need to download lighttpd as an RPM file from DAG.

The DAG packages for lighttpd can be found at http://dag.wieers.com/rpm/packages/lighttpd/

Use the following commands to download the lighttpd application and the lighttpd FastCGI libraries:

  1. wget http://dag.wieers.com/rpm/packages/lighttpd/lighttpd-1.4.18-1.el4.rf.i386.rpm
  2. wget http://dag.wieers.com/rpm/packages/lighttpd/lighttpd-fastcgi-1.4.18-1.el4.rf.i386.rpm

Once you have retrieved the lighttpd RPM files, use the following commands to complete the installation:

  1. rpm --Uvh lighttpd-1.4.18-1.el4.rf.i386.rpm
  2. rpm --Uvh lighttpd-fastcgi-1.4.18-1.el4.rf.i386.rpm


lighttpd apt Installation

apt-get is the preferred installation method for Debian or Ubuntu.

Enter apt-get install lighttpd under an account with root privileges or use sudo to run the command as the root user.


Configure lighttpd

For this, I'm just going to go over the absolute basic configuration to get lighttpd up and running.

More information on module-specific configuration can be found in the lighttpd documentation.

/etc/lighttpd/lighttpd.conf will be your primary configuration file.


lighttpd server.* Directives

The server.* directives are absolutely required for lighttpd to start up successfully.

server.modules is an array that tells lighttpd what modules load when it starts up.

Simply uncomment an existing line in the default lighttpd.conf file, or add it if it isn't there already.

server.document-root is the default document root. The document root directive is especially important if you are not using a virtual host configuration, though it must be set even if you are.


Advanced Installation: Compile lighttpd from Source

Compiling lighttpd from source can be useful when tweaking for absolute performance or using a recent version of lighttpd which has not been released in major distribution repositories.

More information regarding lighttpd installation from source may be found on the lighttpd Wiki.

Retrieved from "http://wiki.vpslink.com/index.php?title=Install_and_Configure_lighttpd&oldid=15278"
Recent Changes | RSS RSS Feed