lighttpd newbie here...

We're trying to set up lighttpd to host a local django app, kiosk-style. We intend to use wsgi for this, but we're having trouble figuring out the syntax for lighttpd's config file -- examples pulled straight from lighttpd docs are throwing syntax errors!

It seems there are two syntaxes in play:

  • One has semicolons, and function calls seem to work. Examples of this style can be found here and here. Keywords like module_load and docroot seem to be valid. The following lines, placed at the top of /etc/lighttpd/lighttpd.conf, crash on startup with a syntax error:
  setup { 
          module_load ( "mod_expire", "mod_fastcgi", "mod_vhost", "mod_lua" );
          lua.plugin "core.lua";


core.wsgi ( "", {fastcgi: "/var/run/lighttpd/kiosk.sock"} )
  • The other style seems more straightforward, and lines up with the official Configuration File Syntax, as seen here. There are no line-ending semicolons, and function calls (other than assignment) do not seem to work. This format reads more like the config-file-with-conditionals format described in the documentation, and the keyword equivalent for server.document-root ("docroot") does not seem to work here.

What is going on? Why are there two seperate configuration syntaxes? One style seems to be lua (which I'm not very familiar with...) How are they used? When is it best to use which?

I've tried Googling this, but it is difficult to search for. Lots of generic or app-specific results, with, seemingly none naming the paths of the files they show.

  • Are you using Ligthhtpd 2 or 1.4? – sebix Sep 9 '15 at 19:26
  • 1.4. Seems the other syntax is for 2.0 – Tom Corelis Sep 9 '15 at 21:03

So the answer turns out to be the difference in syntax between version 2 (currently in beta) and 1.4. 1.4 has the non-semicolons, 2 has the semincolons

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.