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.

Comments on this entry are closed.

  • Rich Manalang Feb 8, 2006 @ 19:28

    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”
    )))

  • Kev Feb 8, 2006 @ 21:11

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

  • Sniper Fox Feb 8, 2006 @ 21:49

    Use slow (regular) CGI. It works fine.

  • Guy Robinson Feb 9, 2006 @ 4:15

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

  • Guy Robinson Feb 9, 2006 @ 15:16

    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

  • Gena01 Feb 9, 2006 @ 16:23

    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

  • Kev Feb 9, 2006 @ 17:06

    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

  • Kev Feb 9, 2006 @ 17:11

    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.

  • Gena01 Feb 9, 2006 @ 17:19

    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

  • Guy Robinson Feb 9, 2006 @ 18:53

    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?

  • Guy Robinson Feb 10, 2006 @ 0:03

    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

  • Kev Feb 10, 2006 @ 6:03

    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.

  • Fabricio Feb 10, 2006 @ 9:52

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

  • Gena01 Feb 10, 2006 @ 10:13

    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.

  • Gena01 Feb 10, 2006 @ 10:32

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

  • LJones Feb 10, 2006 @ 12:58

    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.

  • LJones Feb 10, 2006 @ 13:10

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

  • Kev Feb 10, 2006 @ 14:04

    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?

  • Gena01 Feb 10, 2006 @ 14:14

    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

  • Kev Feb 10, 2006 @ 14:41

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

  • Gena01 Feb 10, 2006 @ 16:38

    Nope. nothing.

  • Kev Feb 10, 2006 @ 17:00

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

  • Gena01 Feb 10, 2006 @ 17:20

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

  • Gena01 Feb 10, 2006 @ 17:24

    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.

  • Kev Feb 10, 2006 @ 19:17

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

  • LJones Feb 11, 2006 @ 11:16

    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.

  • Kev Feb 11, 2006 @ 15:22

    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.

  • Yenan Feb 14, 2006 @ 21:27

    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

  • Guy Feb 14, 2006 @ 23:19

    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

  • Kev Feb 15, 2006 @ 10:54

    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.

  • Guy Feb 15, 2006 @ 15:18

    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

  • Kev Feb 16, 2006 @ 13:11

    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.

  • c00i90wn Feb 18, 2006 @ 11:52

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

  • tellman Feb 19, 2006 @ 15:51

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

  • huw Feb 19, 2006 @ 18:30

    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

  • Kev Feb 19, 2006 @ 19:52

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

  • c00i90wn Feb 19, 2006 @ 22:32

    Kev: what about mirroring the file?

  • J. Doe Feb 20, 2006 @ 9:30

    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.

  • Kev Feb 20, 2006 @ 10:44

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

  • c00i90wn Feb 20, 2006 @ 12:25

    no problem, thank you for mirroring it now ;)

  • fabricio Feb 20, 2006 @ 14:39

    Tnx! a new mirror =)

  • SpookyET Feb 20, 2006 @ 16:50

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

  • blar Feb 21, 2006 @ 7:11

    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

  • Kristiaan Feb 21, 2006 @ 17:29

    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

  • Xiaogang Feb 21, 2006 @ 23:03

    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

  • Kev Feb 22, 2006 @ 6:48

    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.

  • Kristiaan Feb 22, 2006 @ 7:09

    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

  • Kev Feb 22, 2006 @ 12:47

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

  • Kristiaan Feb 23, 2006 @ 4:19

    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

  • Kev Feb 23, 2006 @ 8:54

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

  • Kristiaan Feb 23, 2006 @ 13:41

    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 ?

  • Sami Feb 23, 2006 @ 14:25

    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.

  • Kev Feb 23, 2006 @ 15:37

    Sami: what is the exact filename?

  • Sami Feb 23, 2006 @ 15:44

    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?
    :)

  • FiZZMO Feb 23, 2006 @ 16:19

    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

  • deniz Feb 23, 2006 @ 16:24

    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.

  • Kev Feb 23, 2006 @ 17:20

    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…) : //kevinworthington.com/?p=106#comment-1442

  • Sami Feb 23, 2006 @ 17:26

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

  • Kristiaan Feb 24, 2006 @ 3:15

    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

  • Kev Feb 24, 2006 @ 7:48

    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.