Build / Cross Compile lighttpd for ARM Linux with pcre

This is a record of how I built lighttpd with pcre for ARM. Most examples of cross compiling lighttpd for ARM do not include pcre, but to get the best out of lighttpd you really do need pcre built in. So we first need to get and cross compile pcre and then lighttpd.

Build pcre for ARM

In this example I assume that you create the build directories in you home directory, e.g. /home/youruser/ , you will need to change this in the following commands to match your actual directory set-up.

This should build pcre and install the output files into the following directory:


Change this path to suit your own needs.

Build lighttpd for ARM

Now that we have build pcre we can build lighttpd as follows, there is a bit of trickery involved for getting it to build with pcre, but happily this article showed me the way (thanks)!

Again remember to change: /home/youruser/ in each case.

If the build succeded, all the files that you need to install lighttpd on your target ARM device should be under: /home/youruser/build_lighttpd/_install

Here is an article which talks about how to manually install lighttpd.

But at a very minimum you need to:

(a) Download and edit the config file – lighttpd.conf
(b) Copy the pcre libs to /usr/lib or similar – ,
(c) Copy on the lighttpd binary from: /home/youruser/build_lighttpd/_install/sbin
(d) Copy on the lib folder from /home/youruser/build_lighttpd/_install/lib
(e) Run lighttpd specifying the paths to config file and lib folder, for example:

lighttpd -D -f /etc/lighttpd/lighttpd.conf -m /usr/lib

Thanks to the following articles for the build info!