Lighttpd is a light-weight web server, suitable for serving static content. This article assumes you are going to install and configure Lighttpd on Debian GNU/Linux.
To install Lighttpd, execute the following as root:
aptitude install lighttpd
The configuration file of Lighttpd is located at
/etc/lighttpd/lighttpd.conf. A simple configuration looks
like the following:
Explanation of some of the configuration options:
server.modulesspecifies the modules to be used.
server.error-handler-404specifies the URL to be called and returned as response in case of 404 (Not Found) error.
server.portspecifies which port will Lighttpd listen on for incoming requests.
server.tagspecifies the header value of
Serverto be included in response. Setting the value to empty string ("") effectively removes the header from response.
index-file.namesspecifies an array of file names which are considered as index file.
ssl.pemfilespecifies the of a PEM file containing both private key and certificate. If the SSL certificate is CA-signed, you should also specify the
ssl.ca-fileoption which the file contains chain of root and intermediate certificates.
Always refer to the official document for configuration syntax and options: