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