This is an old revision of the document!


HOWTO Build lighttpd

First, set up your crosscompile toolchain. Download build_lighttpd_pa1.tgz. Extract, edit the file to correct the bug in tar xvfz zips/.tar.gz –> tar xvfz zips/$APP-$APP_VER.tar.gz and then execute.

Transfer the result, dns323_lighttpd-1.4.13.tar.gz, to /mnt/HD_a2 and extract it lnx_bin/busybox3 tar xvz -f dns323_lighttpd-1.4.13.tar.gz

Create a file, index.html, located in /mnt/HD_a2/www:

<html>
  <body>
    Hello World from DNS-323
  </body>
</html>

Create a file, lighttpd.conf, located in /mnt/HD_a2/lnx_bin:

server.document-root = "/mnt/HD_a2/www/"
server.port = 3000
mimetype.assign = (
  ".html" => "text/html",
  ".txt" => "text/plain",
  ".jpg" => "image/jpeg",
  ".png" => "image/png"
)

Now, let lighttpd analyze the file using ./lighttpd -t -f lighttpd.conf and if that worked out, start the server using ./lighttpd -D -f lighttpd.conf

Access your server on port 3000, e.g. http://192.168.0.200:3000/index.html

Notes on the application

The default path for the mod_-files are compiled into the application to be /mnt/HD_a2/lnx_bin/lib using the -DLIBRARY_DIR directive. To have the modules in another directory, change the build script or start the server with argumet -m PATH

Note on lighttpd version

Beginning with 1.5.0, lighttpd depends on glib2.

Easy Way

A pre-compiled variant can be found here


Navigation

Personal Tools