Cross-compiling lighttpd with SSL for Android ARM

Problem

During my collaboration with Grey-Box project we encountered a problem that we need fast and lightweigth http server with SSL support and PHP support.

We decided to use lighttpd since it doesn’t require PHP daemon to run permanently.

Existing builds had not included SSL support, and compilation using native ARM toolchains also didn’t work.

Solution

Using Android NDK I managed to build lighttpd for Android as well as its requirements: zlib, pcre and openssl.

The only module excluded from compilation (so not supported) is mod_webdav, since implementation of this module in lighttpd uses features of Linux kernel which are not supported in Android OS.

Github

Here is the source project