lighttpd 1.4.11 for Windows

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.

Although the source has been available for a few days, lighttpd 1.4.11 for Windows is finally here. Besides the upstream fixes from lighttpd.net, a few minor changes exist in this release. The most major to note is that an alternative stop batch file is now available for XP (and up) users. It is called stop-lighttpd2.bat and can directly replace the regular stop batch file. As usual read the release notes (in the installer) before installing/upgrading. Regarding the new stop batch file, from the readme.txt:

stop-lighttpd2.bat is an alternate stop batch file for Windows XP which doesn’t need process.exe. It uses Windows’ taskkill.exe instead.

Download: lighttpd-1.4.11-win-setup.exe

If you download this version, please Digg it… Thanks.

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

Check out the StudioPress Theme of the Month - News Theme here

{ 140 comments }

Fennec May 13, 2006 at 02:23:44 PM

I was having the weirdest problems using PHP with this distribution. The output would start in the middle of the HTTP headers. Changing

cgi.assign = ( “.php” => “c:/php/php.exe” )

to

cgi.assign = ( “.php” => “c:/php/php-cgi.exe” )

fixed it, however.

Kev May 13, 2006 at 04:49:42 PM

Fennec: Yes, you need the cgi version of php. Some versions of PHP have cgi compiled in as php.exe, but often you need the explicit php-cgi.exe.

Kev June 2, 2006 at 03:26:38 PM

Nav: First you have to figure out which version of PHP to use. From the command-line, doing: php -v should tell you which version to use, it should have fcgi-cgi as part of the info. (for the ‘-v’ line, substitute php.exe, php-cgi.exe, etc. for ‘php’ and make sure you are in the C:\php directory when you run that command) Once that is determined, try typing the cgi.assign line from scratch. Sometimes when cutting the line of text, the quotes can get mangled.

Nav June 2, 2006 at 12:08:26 PM

Alright. Ive been trying all day now, ive read all the posts and such. I can’t get lighthttpd to work with php and mysql. The modules loaded are mod_rewrite mod_cgi mod_access and mod_accesslog

and my the assigns ive tried are:

cgi.assign = ( “.php” => “C:/php/php.exe” )
cgi.assign = ( “.php” => “C:/php/php-win.exe” )
cgi.assign = ( “.php” => “C:/php/php-cgi.exe” )

and none will work. at best the php pages that use mysql wont load and the ones that load will only load two or three bits of the code. What should i do!?

Nav June 3, 2006 at 04:09:44 AM

What im getting when i type php -v in C:/php is

PHP 5.1.4 (cli) (built: May 4 2006 10:35:22)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Is it the (cli) part im supposed to be loking at?

i noticed copying the cgi.assign line fooks it up so i did redo it. And i still can’t load the site :/

Kev June 3, 2006 at 01:32:56 PM

Nav: you need a version of php that will say cgi-fcgi instead of cli or cgi. Maybe point to php-cgi.exe in your config file, if php-cgi.exe does exist on your machine in the c:/php directory. For example,on my machine I get the following:
C:\PHP>php-cgi.exe -v
PHP 5.1.1 (cgi-fcgi) (built: Nov 27 2005 21:38:47)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2005 Zend Technologies

Nav June 6, 2006 at 02:29:35 AM

still doesn’t work :/ given up trying, ty for the time tough

Techknight June 11, 2006 at 01:35:16 AM

Hi ,

I tried and made a system tray menu for LightTPD windows port. Its available at
Lighty Release 0.1
http://open-source.onestop.net/2006/06/lighty-tray-release-01.html

Please let me know if it was worth the try.

Cheers

Brandon June 18, 2006 at 02:35:59 AM

I’ve installed lighttpd and configured it, but it refuses to start.
There are no errors returned and nothing logged. Doesn’t appear in the process list.

Any ideas? There don’t appear to be any configuration errors

Kev June 18, 2006 at 02:50:53 PM

Brandon: what version of lighttpd, and version of Windows? Did you ever have Cygwin installed on your system? If so, search for cygwin1.dll and replace cygwin1.dll in the C:\lighttpd\sbin directory with your previously installed cygwin1.dll

Rick June 21, 2006 at 07:58:12 PM

i just installed the latest version of lighty and php. lighty is lightning fast for html pages, but anytime i try to load a php page, i got a 403 – forrbidden error.

i used the PHP 5.1.4 installer from http://www.php.net/downloads.php – is any further config of php required?

i tried both:
cgi.assign = ( “.php” => “c:/php/php-cgi.exe” ) and
cgi.assign = ( “.php” => “c:\php\php-cgi.exe” )

output from php-cgi.exe -v:
PHP 5.1.4 (cgi-fcgi) (built: May 4 2006 10:35:07)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

thanks for your help,
__Rick

Kev June 21, 2006 at 08:26:30 PM

Rick: did you uncomment mod_cgi at the top of the lighttpd.conf? That is probably your problem. Let me know…

Furio June 22, 2006 at 06:14:46 PM

I’ve installed this version with php as CGI, but it still vulnerable to the downoload code bug adding a trailing dot and space to the url. It’s me or it is also for you guys?

Rick June 22, 2006 at 07:17:51 PM

Kev,

ok, it works now. i knew it was going to be something simple.

thanks for the suprisingly quick reply,
__Rick

Kev June 23, 2006 at 06:53:20 AM

Furio: Can you link any information about this bug? I am not aware of it currently.
Rick: I’m glad it works for you. You’re welcome.

Andrew June 24, 2006 at 01:50:17 PM

Kev, I have the same problem that Brandon (about lighttpd not appearing in the process list).

The thing is, I tried installing Cywin (don’t ask me why, since I don’t even know exactly what it is >_>), I successfully did it, and since I didn’t find an uninstall option, I just deleted it.

Today when I tried starting lighttpd, it just doesn’t run. Please help me, I don’t find any other cygwin1.dll on my system, and I’ve tried reinstalling and reinstalling lighttpd with no aval. I beg you, give me some alternatives to solve this little issue.

Thanks beforehand.

Kev June 24, 2006 at 09:54:54 PM

Andrew: from the Start menu, go to run and type in ‘cmd’ (no quotes) and hit Enter. Then type in ‘C:\lighttpd\sbin\lighttpd.exe -f C:\lighttpd\etc\lighttpd.conf’ (also without quotes) and report any errors that you might get here on this site. Also mention your Windows version here and any service packs that you might have.

Andrew June 24, 2006 at 10:15:21 PM

Well, I didn’t even get a single error. It was just like if I had just pressed Enter.

I’m on Windows XP SP2, and up-to-date (critical fixes and all that stuff). I think last time I updated was yesterday, so maybe’s got something to do with it.

Thank you.

PS: HEEEEEEEEEEEEEEELP! This is making me want to reinstall Windows just for that. It was working so flawlessly…

Kev June 24, 2006 at 10:52:48 PM

Andrew, does it show up in the task manager at all? Also have you tried turning off your firewall temporarily to see if that has any effect?

Andrew June 25, 2006 at 08:46:03 AM

No, it doesn’t show up at all. Using the normal “Start lighttpd” just makes it so that ping and cmd appear, but not lighttpd. :(

About the Firewall, it’s disabled (actually, my choice) by default. The thing is, I had been working with lighttpd for a while, then I just shut it down for some days, installed Cygwin to see what it was all about, didn’t know shit, then deleted it, and tried lighttpd again, and poof, no good.

Well, if there doesn’t seem to be any apparent solution, then I’ll just restrain myself from using it for a while… at least until I reinstall Windows.

Thank you for your support, and now given the facts that some people have this problem, there should be a warning for the people trying to install Cygwin. I guess it lets a reference to the DLL to its installation path, which, in this case, isn’t where the cygwin1.dll now resides.

Thanks again. ;)

Kev June 25, 2006 at 11:22:18 AM

Andrew, having Cygwin and lighttpd is not necessarily a problem. I have both installed on my system. What is a problem is when the cygwin1.dll is a different version between the two installations. Make sure to search for cygwin1.dll on your whole system, and replace any versions of it with the one installed by lighttpd.

John Savior June 26, 2006 at 11:10:18 AM

i had the same c:/lighttpd/lib/mod_auth.dll error but for me it was easy to fix i just stop another webserver that i had running and that was all…
so yoy just try to find wich service that you have running in your windows is using de 80 port and stop it.

Michael June 27, 2006 at 05:02:06 AM

I’m getting a 403-Forbidden error when I try to load awstats on my server. I finally discovered that if I comment out mod_compress from loading, then the stats page loads and works fine, but as soon as I add mod_compress back in, I get the error.

Thanks for any help

Kev June 27, 2006 at 07:39:02 AM

Michael, I don’t think that mod_compress is working properly in the Windows release of lighttpd. Click here to seee an earlier comment I made, above

Michael June 27, 2006 at 08:24:41 PM

I had mod_compress working good without having mod_cgi enabled, but together they wouldn’t work correctly. So I think it’s just a combination of the two. I saw info on a mod_deflate that someone else made, is there any plans of porting this over to the windows version?

Comments on this entry are closed.

{ 3 trackbacks }

Previous post:

Next post: