[FAQ] Lighttpd general help and common mistakes

Hello

Since here aren't that many discussions like this, I decided to create one for everyone to find.

Basic instructions are here: LuCI on lighttpd [OpenWrt Wiki]

My intention is that everyone who makes or has made mistakes setting up lighttpd could check this thread and put questions here and then answer them as he succeeds in fixing the problem.

At first, Firefox offered to download the LuCI interface. Which I, of course, refused. Restarting lighttpd I got to my next step. I got an empty page with a title: Status: 500 Internal Server Error /usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/'. The called action terminated with an exception: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'sysauth'. A

Wonder how should I proceed?

Edit: Got this. First I ran lighttpd manually.

# /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D

Then I requested the management interface, and got (in the terminal):

/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/'. The called action terminated with an exception: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'sysauth'. A runtime error occured: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'header'. A runtime error occured: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'themes/bootstrap/header'. A runtime error occured: [string "/usr/lib/lua/luci/view/themes/bootstrap/hea..."]:150: attempt to index local 'boardinfo' (a nil value) stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:460: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>

Edit: The problem is that you must run LuCI as root. Lighttpd runs by default as http:www-data (UID 102, GID 33).

Lighttpd will refuse to start as root: 2017-07-26 21:42:42: (server.c.1031) I will not set uid to 0\n.

Except if you comment out server.username and server.groupname from /etc/lighttpd/lighttpd.conf instead of setting them to root.

Then you might see (in the browser):

/usr/lib/lua/luci/dispatcher.lua:501: Fatal: Indexcache is not sane!
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:501: in function 'createindex'
/usr/lib/lua/luci/dispatcher.lua:544: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:220: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>

which you can rectify by running rm /tmp/luci-indexcache

Chapeau!!!

you dont know how many time i google for a solution with luci @ lighttpd

and you made it!!! thanks a lot

B0F1B0

( Technicolor TG799vac (Telstra)
DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer 15.05.1'
Luci: not installed, not currently compatible)

https://wiki.openwrt.org/doc/howto/http.lighttpd

/usr/bin$ opkg list-installed | grep lighttpd
lighttpd - 1.4.45-3
lighttpd-mod-auth - 1.4.45-3
lighttpd-mod-auth-thor - 1.1.3018
lighttpd-mod-authn_file - 1.4.45-3
lighttpd-mod-fastcgi - 1.4.45-3
lighttpd-mod-setenv - 1.4.45-3

...
Configuration
Edit /etc/lighttpd/lighttpd.conf

Why don't I have /etc/lighttpd/lighttpd.conf?

bump post.

2 posts were split to a new topic: Running Lighhtpd on an OpenWrt router