Lighttpd support


Lighttpd support is experimental.

The uwsgi handler for Lighttpd lives in the /lighttpd directory of the uWSGI distribution.

Building the module

First download the source of lighttpd and uncompress it. Copy the lighttpd/mod_uwsgi.c file from the uWSGI distribution into Lighttpd’s /src directory. Add the following to the lighttpd src/ file, after the accesslog block:

mod_uwsgi_la_SOURCES = mod_uwsgi.c
mod_uwsgi_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_uwsgi_la_LIBADD = $(common_libadd)

Then launch

autoreconf -fi

and as usual,

./configure && make && make install

Configuring Lighttpd

Modify your configuration file:

server.modules = (

# ...

uwsgi.server = (
  "/pippo" => (( "host" => "", "port" => 3033 )),
  "/" => (( "host" => "", "port" => 3031 )),

If you specify multiple hosts under the same virtual path/URI, load balancing will be activated with the “Fair” algorithm.

Table Of Contents

Previous topic

The SPDY router (uWSGI 1.9)

Next topic

Attaching uWSGI to Mongrel2

This Page