Mini-HOWTO: Building Lighttpd for Windows with Cygwin

PLEASE NOTE: Native Lighttpd Windows builds are available at http://en.wlmp-project.net/
The last available Lighttpd for Windows build that I created using Cygwin was Lighttpd for Windows 1.4.17.
Updated September 29, 2009.

lighttpdBefore I start, I want to put up a quick disclaimer:
This guide is intended to help out people who want to compile lighttpd for windows using the cygwin environment. It is just a basic, small howto to help get you started. It is in no way complete by any means. I am assuming a lot of things in this tiny tutorial. For example that you are running 2000, NT, XP, or 2003 Server, and NOT 95/98/Me or something ancient like 3.1 or DOS 6.22. I also will be assuming that you have cygwin installed with all associated compile tools, and that you have some familiarity with cygwin or a unix/linux shell.
Ok, with that said, are you ready? OK here goes:

Untar and un-gzip the lighty source package and enter its directory. Run:
./configure –prefix=C:/whatever/directory/you/want
(NOTE: use forward slashes above. Also, that is it “dash dash prefix” – 2 dashes.)
make
make install

Create a lighttpd.conf (or copy a previous .conf) to the etc directory
in your lighty install path. Try to run lighty from within the sbin
directory (from a C: prompt, not in the cygwin environment):
lighttpd -f ..etclighttpd.conf (NOTE: use backslashes this time)

It will complain about cygwin1.dll missing. Copy it from C:cywginbin (or where ever you installed cygwin) to lighty’s sbin directory. It will complain about more files missing; simply repeat the same procedure of copying the missing files from cygwin’s bin directory to lighty’s sbin directory. It will run eventually, test by going to http://127.0.0.1 (localhost) once an error does not pop up.

For more hints, check out the contents of the batch files I provide in
the sbin directory, and good luck.

I will accept comments, in order to help other do-it-yourselfers, but I will only make corrections to this mini-guide if I’ve made a huge mistake. Please do not point out that this guide is incomplete. I already know that, and have said it above. Thanks.

Reference: lighttpd forum – http://forum.lighttpd.net/topic/1102#2997 (Wayback Machine link; original seems gone.)

Next post:

Previous post: