Lighttpd is a highly-configurable, lightweight web server. See lighttpd and http://www.lighttpd.net/. There are many modules available for lighttpd that can be installed and configured. For more information on the modules see http://redmine.lighttpd.net/projects/lighttpd/wiki/docs. This article explains how to get lighttpd working on OpenWrt.
- Consult luci.on.lighttpd to make lighttpd serve the LuCI web interface.
opkg list lighttpd*to see what packages are available.
opkg update opkg install lighttpd
To get a basic server running make the following changes to
Server Root Directory
where www1 is the root directory of the web server.
Uncomment (remove #) the following line so errors are written to the log:
Set Server Port
Uncomment the following line:
where 8000 is the port you want your webserver on.
To enable/disable start on boot:
/etc/init.d/lighttpd enable this simply creates a symlink:
/etc/rc.d/S90umurmur → /etc/init.d/umurmur
/etc/init.d/lighttpd disable this removes the symlink again
To start the server one time:
To stop the server again:
To allow users on the WAN to access the server, make sure to configure the firewall in
/etc/config/firewall and port forwarding settings.
Restart the firewall with the following command:
TODO: directory, etc.
Incorrect Event Handler
If you get the following error:
(server.c.1105) fdevent_init failed,
you might need to set the event handler explicitly for your system. Add the following line to the configuration file:
- Note that lighttpd does not support
.htaccessfiles as some web servers do to configure directory specific server settings. Instead, it uses a centrally configured system using
lighttpd.confto define all settings, using powerful matching functions. This still means that you have to manually set up directory settings. Especially for (opkg) packages that supply
.htaccessfiles to define required settings. Allowing directory listings is one example that should be disabled or enabled as per the required security level.
doc/howto/http.lighttpd.txt · Last modified: 2013/08/11 22:18 by grabbel