Lighttpd 1.4.10 for Windows now available

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.

lighttpd 1.4.10 for Windows is now available. Besides the normal upstream changes available at lighttpd.net/download/, this version for Windows has webdav properties from mod_webdav compiled in, as requested. I did try to make this release include the option to run lighty as a service, but came up empty. If I get it working, I’ll release a rev A.

Did you enjoy this article? Please subscribe to my feed to receive FREE updates via RSS or Email.

1 Rich Manalang February 8, 2006 at 7:28 pm

Have you tried PHP5 with this? I can’t seem to get it to work. I’ve configured fastcgi like this:
fastcgi.server = ( “.php” => ((
“bin-path” => “c:/php/php-cgi.exe”,
“socket” => “c:/php/tmp/php.socket”
)))

2 Kev February 8, 2006 at 9:11 pm

This is a known issue: PHP with FastCGI on Windows doesn’t work.

3 Sniper Fox February 8, 2006 at 9:49 pm

Use slow (regular) CGI. It works fine.

4 Guy Robinson February 9, 2006 at 4:15 am

YAY!!!! Cheers Kevin.Downloading now so will try webDAV and report back.
Guy

5 Guy Robinson February 9, 2006 at 3:16 pm

WebDAv seems to work. When I try and create a webfolder in windows it recognises the folder but I’m still trying to get authentication working.
Cheers,
Guy

6 Gena01 February 9, 2006 at 4:23 pm

I just tried installing this for the first time on my Windows 2000 PC and I go through the install. If I let it start the server from the install I get a console window and then my CPU goes 100% and I can’t kill the process. After shutdown if I try to use the shortcuts for start and stop then nothing happens. The webserver however seems to start fine if I run it from the command-line with -D -f ..etc… options. If i don’t let the install run it, then install completes and I still can’t start the webserver. The log files are empty too.
Please advise.
Gena01

7 Kev February 9, 2006 at 5:06 pm

Gena01: here are some things to try:
1. try to run this command from a prompt:
C:lighttpdsbinlighttpd.exe -f C:lighttpdetclighttpd.conf
2. try searching for other files on your hard drive named cygwin1.dll
Let me know the result of those. Also, note if you changed anything in lighttpd.conf

8 Kev February 9, 2006 at 5:11 pm

I just tried it on a Windows 2000 machine, and you are correct, it does not run from the installer. However, it should run fine from the start menu or from the desktop icons or quick launch icons. Please let me know if it does not.

9 Gena01 February 9, 2006 at 5:19 pm

When I run it from the command prompt it starts and exits immediately. Nothing new in the logs. I don’t have any other copies of cygwin1.dll other than C:lighttpdsbin
Gena01

10 Guy Robinson February 9, 2006 at 6:53 pm

Kevin,
Using this addition to the .conf file:
$HTTP["url"] =~ “^/store($|/)” {
webdav.activate = “enable”
auth.backend = “plain”
auth.backend.plain.userfile = “C:/lighttpdetc/lighttpd.user”
}
And loading mod_auth to carry out authetication I get :
[Guy Robinson] C:lighttpdsbin$ lighttpd.exe -f ..etclighttpd.conf
006-02-10 12:10:00: (plugin.c.165) dlopen() failed for: C:/lighttpd/lib/mod_aut
.dll No such file or directory
006-02-10 12:10:00: (server.c.583) loading plugins finally failed
Even if I add c:lighttpdlib to the path I still get this error. Any ideas?

11 Guy Robinson February 10, 2006 at 12:03 am

Kevin ;-)
Did a clean install and the latest build doesn’t include a mod_webdav..dll. So webdav isn’t working. Also whenever I try and load a mod_* I get the following error:
[Guy Robinson] C:lighttpdsbin$ lighttpd.exe -f ..etclighttpd.conf
2006-02-10 16:47:25: (plugin.c.165) dlopen() failed for: C:/lighttpd/lib/mod_aut
h.dll No such file or directory
2006-02-10 16:47:25: (server.c.583) loading plugins finally failed
Guy

12 Kev February 10, 2006 at 6:03 am

Gena01: it sounds cliche, but did you try rebooting? Try uninstalling lighttpd and then installing it again?
Guy: that’s strange because I can definitely see mod_auth.dll in my lib directory. mod_webdav does not appear there though. I’ll investigate.

13 Fabricio February 10, 2006 at 9:52 am

How to install anotlher partition? Ex: E: i not use c:

14 Gena01 February 10, 2006 at 10:13 am

Kev: I did reboot. And same thing. It has something to do when it tries to go into background, because I can run it just fine using -D option.
The service stuff is a bit wacky. There’s registration in the registry. Then it executes the program with specific command-line parameters for start/stop. I remember seeing how it was done a while back. I might need to search for that code.

15 Gena01 February 10, 2006 at 10:32 am

Here is a little C tutorial on writine a service in c:
http://www.devx.com/cplus/Article/9857

16 LJones February 10, 2006 at 12:58 pm

Gena01: I was just looking that reference up. It’s the best description I’ve seen that doesn’t seem to believe you’re using VisualStudio.
Kev: Do you have a diff file available with your changes? (or source zip)
if you’re trying to do the instsrv/srvany route (like seems to be included in the installation) you also need to add registry keys.
Assuming “C:lighttpd” as the installation directory (as came default) and the service.bat file this would be the minimal additions

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLighttpdServerParameters]
“Application”=”C:\lighttpd\sbin\lighttpd.exe”
“AppParameters”=”-f ../etc/lighttpd.conf”
“AppDirectory”=”C:\lighttpd\sbin\”

Old but still good instructions
How To Create a User-Defined Service
http://support.microsoft.com/kb/q137890/
It seems the srvany.wri file is no longer included in the 2003 resource kit (which is where you’d normally find out about the option AppParameter and AppDirectory entries) but the microsoft ftp site still has the nt4 reskit which includes it.

17 LJones February 10, 2006 at 1:10 pm

Apologies, the entry name is AppParameters, I spelled it properly in the regedit extract but incorrectly in the text below that.

18 Kev February 10, 2006 at 2:04 pm

Fabricio: Currently, it will only install to the root of C: beacause many of my batch files to point to absolute paths, explicitly.
Gena01: If it works fine with the -D option, simply edit C:lighttpdsbinstart-lighttpd.bat and add it in.
LJones: I do not have any modified source. I use the source from lighttpd.net in all of my builds. The only thing I do is compile it in a Cygwin (Windows) environment, add a few batch files and icons, and package it up. Also, when I tried making it a service, I did modify registry keys, following documents on microsoft’s website and in forum posts at forum.lighttpd.net/forum/1 but it didn’t work out for me. I will try your method soon when I have more time, but I have to ask – are those double backslashes actually the way to add the paths in the registry, or were you just trying to escape them for this post?

19 Gena01 February 10, 2006 at 2:14 pm

I could add -D but then it would run in “debug” mode. I would rather see it perform in normal working setup, ie. background and serve requests as quickly as possible.
Gena01

20 Kev February 10, 2006 at 2:41 pm

Gena01: If you start it from a prompt without the -D does it spit out any information?

21 Gena01 February 10, 2006 at 4:38 pm

Nope. nothing.

22 Kev February 10, 2006 at 5:00 pm

Gena01: Do you have another computer that you can try lighttpd on, by any chance? (I can not reproduce this problem here.)

23 Gena01 February 10, 2006 at 5:20 pm

Yeah. I’ll try to set it up at home. I have similar environment there.

24 Gena01 February 10, 2006 at 5:24 pm

mmmm.. you gave me an idea of what might be wrong. I had cygwin installed before.. So i went and removed some cygwin registry entries and now it’s working.

25 Kev February 10, 2006 at 7:17 pm

Aha! I thought that might be the case. Cygwin can easily conflict with old versions. Anyway, I’m glad it works for you now.

26 LJones February 11, 2006 at 11:16 am

I posted this yesterday but am not seeing it.
The double backslashes are from a cut and paste regedit export. *.reg files must have backslashes escaped. When you enter the values directly into the registry (via regedit or similar) then you do not need to escape the backslash. You should be able to copy/paste the section between the — into a “service.reg” file and run it after your service.bat and have lighty running as a service. lt seems to be working on 2 test machines here (winxp and win2k).
If you add the path via the services console you may need to escape the backslash but that depends on the windows version.
I’d asked for source diff since you wrote “besides the normal upstream changes” which (to me) implied something was added in. Sorry for the misunderstanding.

27 Kev February 11, 2006 at 3:22 pm

I guess that was a poor choice of words on my part. I should have said that the only changes for this version are the normal changes from lighttpd.net from 1.4.9 to 1.4.10 and that I compiled in mod_webdav. (which doesn’t seem to work according to Guy Robinson.) In the next few days, I will try to monkey around with the registry/making it a service again, time permitting. Thanks for all the feedback.

28 Yenan February 14, 2006 at 9:27 pm

I enable ssi by adding the following in lightpd.txt file:
server.modules = (
… “mod_ssi”,…
}
ssi.extension = ( “.shtml” )
Now I added “” to a shtml file, however it doesn’t seem to work.
Am I missing something here…
Thanks

29 Guy February 14, 2006 at 11:19 pm

Yenan,
I’ve tried both the 09 and 10 builds and I suspect you’re having the same problems as me. Start from the commandline and see if you get an error. The only plugin I have got working is CGI.
Guy

30 Kev February 15, 2006 at 10:54 am

It looks like many of the modules that work on a *nix machine do not work on Windows. When I started this project to get a Cygwin-less build, I was shooting for basic functionality and didn’t expect so many people to be interested and use the Windows build. If anybody wants to help out and make everything work on Windows, please let me know.

31 Guy February 15, 2006 at 3:18 pm

Happy to help where I can. Or should we move this to the lighttpd mailing lists? I wonder if a MingW build would work differently? It’s obviously compiling the libraries. So where are the errors? They’re not just path errors are they?
GUy

32 Kev February 16, 2006 at 1:11 pm

I’m not getting any compiler errors. Sometimes the modules simply do not build (without error) or it appears that it was built, but simply doesn’t work. It’s a weird situation.

33 c00i90wn February 18, 2006 at 11:52 am

Can you please mirror the file somewhere else? I’m getting a 509 error. Thank you very much :)

34 tellman February 19, 2006 at 3:51 pm

I’m having troubles running this 16bit intaller on my Windows XP. is there a 32bit virsion of the build/intaller of lighttpD ?

35 huw February 19, 2006 at 6:30 pm

Thanks for the release. Havent tried it yet but it the installer is 16bit could you please update it as Windows XP x64 does not support 16bit files.
Use innodb / nsis

36 Kev February 19, 2006 at 7:52 pm

It is 32 bit as far as I know. I’ve installed it on XP and 2000…

37 c00i90wn February 19, 2006 at 10:32 pm

Kev: what about mirroring the file?

38 J. Doe February 20, 2006 at 9:30 am

I was unable to download lighttpd because “Bandwidth Limit Exceeded”. Maybe you want to consider moving to a propper host for the binary, the one that doesn’t impose low bandwidth limits, like Sourceforge.net.

39 Kev February 20, 2006 at 10:44 am

Sorry about not mirroring; Hosted locally: lighttpd-1.4.10.

40 c00i90wn February 20, 2006 at 12:25 pm

no problem, thank you for mirroring it now ;)

41 fabricio February 20, 2006 at 2:39 pm

Tnx! a new mirror =)

42 SpookyET February 20, 2006 at 4:50 pm

For those of you wishing to install it whereever you want instead of C:/lighttpd, read http://forum.lighttpd.net/topic/197#566

43 blar February 21, 2006 at 7:11 am

If i start lighttpd on Windows XP the server hang. I try to dump network data with tcpspy and i see the server loop and only send an 0 byte to the port 3225
socket (1720) sending a datagram synchronously [len=1, to=127.0.0.1:3225]
socket (1720) sent a datagram that is 1 bytes
0000 00
after a http request lighttpd use 100% of cpu

44 Kristiaan February 21, 2006 at 5:29 pm

i have installed the latest release (1.4.10) and tryed to get php to work, but when i try to load a php page it says :”403 – Forbidden” my config file is like this:
“mod_cgi”,
and
cgi.assign = ( “.php” => “c:/php/php-cgi.exe” )
my php version is 5.1.2
windows version: xp prof

45 Xiaogang February 21, 2006 at 11:03 pm

Dear Kevin,
I have tried to download lighttpd for windows you compiled, but none of them (from 1.4.8 to 1.4.10) accessable. Is there another way to get them?
Thank you very much.
Best regards
Xiaogang

46 Kev February 22, 2006 at 6:48 am

Kristiaan: near the top of lighttpd.conf, you must uncomment mod_cgi, by deleting the # at the beginning of the line.
Xiaogang: look a few comments up, I posted a mirror link.

47 Kristiaan February 22, 2006 at 7:09 am

kev: I did uncomment that line, but is does not work jet, if i look in the log i see a lot of this lines:
(mod_cgi.c.965) fork failed: Resource temporarily unavailable

48 Kev February 22, 2006 at 12:47 pm

Kristiaan: please email me your conf file (kworthington at gmail dot com) and I’ll take a look.

49 Kristiaan February 23, 2006 at 4:19 am

Kev: It’s not the conf file, i tryed it on my other computer (windows mediacenter) and it worked like a charm b.t.w. i tryed it on my other windows xp computer and it gave the same error as the one i tryed the first time

50 Kev February 23, 2006 at 8:54 am

Try looking for cygwin1.dll on your system. The cygwin1.dll that I supplied might be conflicting with another version on your system.

51 Kristiaan February 23, 2006 at 1:41 pm

Kev: i searched for cygwin1.dll files, but only one file came up, C:lighttpdsbin so that can’t be the issue.
problem is i cant reinstall windows because it is a dedicated server :( any idea’s ?

52 Sami February 23, 2006 at 2:25 pm

I am having an http post issue with lighttpd running on Windows. It is looking for the /var/tmp/some_up_file_name but there is no such thing as /var/tmp in Windows (this only applies to files bigger than 64KB)…how do I work around this?
Do I need to cross compile? If so, what is the best way for me to do this under Windows (since I need Windows binaries)?
Thanks a million guys.

53 Kev February 23, 2006 at 3:37 pm

Sami: what is the exact filename?

54 Sami February 23, 2006 at 3:44 pm

Kev: I found it in chunk.c (line 265)
How did you do the compile for Windows? Did you use cygwin? If you did which glibc, gcc, binutils, etc did you use and how did you set it up?
:)

55 FiZZMO February 23, 2006 at 4:19 pm

hi,
since the bandwidth on this server http://www.wd-39.com/misc/lighttpd-1.4.10-win-setup.exe looks exceeded, i propose you to host the files on my ftp server which you could link to on your blog.
if youre interested, just reply to the above email address
bye
FiZz

56 deniz February 23, 2006 at 4:24 pm

Kevin,
I am trying to install 1.4.10 for windows but I can’t get the actual install. Where can I dwonload it for windows?
thnx.

57 Kev February 23, 2006 at 5:20 pm

Sami: yes I used Cygwin and the versions of each of those tools I do not know off hand, I simply installed Cygwin with whatever tools it offered me. FiZZMO and deniz: See this comment (above actually, but click the link is quicker…) : http://kevinworthington.com/?p=106#comment-1442

58 Sami February 23, 2006 at 5:26 pm

Kevin: Was there anything special you had to do to compile lighttpd?
Thanks.

59 Kristiaan February 24, 2006 at 3:15 am

Kev: i found it :D , the problem was coused by the anti-virus scanner i use norman virus control (www.norman.com) after deleting and installing nod32 it worked like a charm

60 Kev February 24, 2006 at 7:48 am

Sami: I am going to put together a HOWTO for building lighttpd on Windows very soon. The best hint I can give you for now is to install everything that Cygwin offers; then configure lighttpd with –prefix=C:/lighttpd (note that it’s two dashes; prefix; equals; [the path], using a forward (unix-like) slash).
Kristiaan: I’m glad you got it resolved.

Comments on this entry are closed.

Previous post:

Next post: