Basic Lighttpd Configuration

Source: Internet
Author: User

Because Lighttpd is required in work, I installed one myself and encountered some problems as follows:

(1) Installation

You only need to perform the following three steps:

./Configure -- prefix =/home/users/XXX/Lighttpd/lighttpd-1.4.20-bin
Make
Make install


(2) create 2 folders in the directory after installation

Mkdir logs

Mkdir html


(3) modify the configuration file

Server. Port = 8321
Server. Modules = (
"Mod_access ",
"Mod_accesslog ")
Server.doc ument-root = "/home/users/XXX/Lighttpd/lighttpd-1.4.20-bin/html /"
Server. errorlog = "/home/users/XXX/Lighttpd/lighttpd-1.4.20-bin/logs/error. log"
Server. PID-file = "/home/users/XXX/Lighttpd/lighttpd-1.4.20-bin/Lighttpd. PID"
Index-file.names = ("index.html ")
Mimetype. Assign = (
". Html" => "text/html ",
". Js" => "text/JavaScript ")
Server. Max-keep-alive-Requests = 4000
A dir-listing.activate = "Disable"
Accesslog. filename = "/home/users/XXX/Lighttpd/lighttpd-1.4.20-bin/logs/access. log"


(4) Modifying HTML files

<Body>
Hello Lighttpd
</Body>


(5) Start Lighttpd

./Lighttpd-D-F Lighttpd. conf-M ../lib /&

Note that the Lib location must be specified during startup; otherwise, the following error will be reported:

2014-08-22 16: 19: 32: (plugin. c.165) dlopen () failed for:/home/users/XXX/Lighttpd/lighttp-1.4.20-bin/lib/mod_indexfile.so/home/users/XXX/Lighttpd/lighttp-1.4.20-bin/lib/mod_indexfile.so: cannot open shared object file: no such file or directory
2014-08-22 16: 19: 32: (server. c.610) Loading plugins finally failed


(6) test


OK. Now we have set up the simplest and most available Lighttpd service!

Basic Lighttpd Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.