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.
This version incorporates patches from lighttpd.net and fixes file uploads, since it was looking for /var/tmp which does not exist on windows.
Download 1.4.10a here
If you download 1.4.10a, Please DIGG it, thanks.
Comments on this entry are closed.
Still no service. Until it can run without being logged in and restart itself when it crashes (both achieved by being added as a service), I can’t replace my glitchy ass apache/win32 with this.
Please work on service installer :) I don’t think fastcgi is a higher priority.
Also getting massive errors with php_apc (Like eaccelerator, but better) :(
This is how you turn it into a Windows Service.
I have done this and has been running for couple of weeks.
———————————————————————
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLightyHTTPServer
[Create this (‘LightyHTTPServer’) key, if it does not already exist.]
‘DisplayName’ parameter should contain this string.
LightyHTTPServer
———————————————————————
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLightyHTTPServer
‘ImagePath’ parameter should contain this string.
“C:lighttpdsbinsrvany.exe”
———————————————————————
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLightyHTTPServerParameters
‘Application’ parameter should contain this string as value
“C:lighttpdsbinlighttpd.exe” -D -f C:lighttpdetclighttpd.conf -m C:lighttpdlib
———————————————————————
Notes:
1) ‘HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLightyHTTPServer’ path must be created for first-time use.
2) In the examples above, remove the single-quotes from parameter *names*.
3) From the examples above, parameter *values* should be copy&pasted (including the double-quotes)
4) If any parameter names are missing, you need to create them at the path shown above.
This is for the default setup. I am not sure if it would also support pathnames with spaces in them. I haven’t tried.
Is there a way to automate this via a batch file or a .reg file? I have tried this on a few machines, without success…
The link is broken. Here:
(Edit: link deleted, Updated above. -Kev)
Might want to try fixing your links buddy. As a fellow Kevin, you’re making us look bad!
Here’s the _correct_ link for people that are trying to ‘digg’ this. ;)
(Edit: link deleted, Updated above. -Kev)
Either link works for me. The one with the nyud.net:8090 is a Coral Cache link to save me some bandwidth. Link added above.
What could be causing problems like this in my error log?
2006-02-28 15:09:05: (connections.c.1165) connection closed: poll() -> ERR 7
2006-02-28 15:09:12: (connections.c.1165) connection closed: poll() -> ERR 10
2006-02-28 15:09:17: (connections.c.1165) connection closed: poll() -> ERR 7
2006-02-28 15:09:20: (connections.c.1165) connection closed: poll() -> ERR 16
2006-02-28 15:09:21: (connections.c.1165) connection closed: poll() -> ERR 14
2006-02-28 15:09:21: (connections.c.1165) connection closed: poll() -> ERR 16
2006-02-28 15:09:21: (connections.c.1165) connection closed: poll() -> ERR 14
2006-02-28 15:09:22: (connections.c.1165) connection closed: poll() -> ERR 6
2006-02-28 15:09:25: (connections.c.1165) connection closed: poll() -> ERR 14
2006-02-28 15:09:25: (connections.c.1165) connection closed: poll() -> ERR 12
2006-02-28 15:09:25: (connections.c.1165) connection closed: poll() -> ERR 7
I looked at the source code of connections.c to try to see if it was anything obvious, but I really do not know in this case. At first I thought it had to do with WebDav, but I do not think that is the case after all. Maybe try asking on the forum:
http://forum.lighttpd.net/forum/1
BUT: make sure you mention that it’s the Windows version. If you don’t want to try the forum, you could try emailing Jan. He usually responds quickly and is very knowledgable. (see lighttpd.net for his email addreess)
I installed 1.4.10a for windows, and get a “The connection to the server was reset while the page was loading.” error when uploading files bigger than about 200kb. (I’m using Rails to handle form upload via POST if that means anything) – file uploads work fine if I use webrick as the server, so I dont think its a mysql/rails issue.
any clues?
Are there any errors in the files within C:lighttpdlogs ? (Besides ‘server started’ messages)
2006-03-03 09:50:47: (connections.c.1063) denying upload as opening to temp-file for upload failed: c:/lighttpd/tmp/lighttpd-upload-k9Ed26 No such file or directory
so…let me take a punt here…I need to create a /tmp directory manually?
If C:lighttpdtmp does not exist, by all means create it and try it.
I have download //kevinworthington.com/wp-content/uploads/2006/02/lighttpd-1.4.10a-win-setup.exe AntiVir found a “SPR/Processor.20” signature in C:lighttpdsbinProcess.exe. I am nervous ;)
That’s odd. There is not a virus there. I’ve tested everything with AVG and Norton.
Look here: http://www.python-forum.de/viewtopic.php?p=32328#32328
I have made a online scan with http://www.virustotal.com
It is at least disturbing! ;)
I do not understand german, but I noticed the chart that listed a few anti-virus programs pick it up as a virus. I do not think there’s a need to worry, it’s probably a false-positive. That executable is provided by beyondlogic.org; here’s the link to the process killer process killer: beyondlogic.org, so if you are really concerned, contact them.
Hm! I have renamed the process.exe…
The process.exe Tool is redundant. At least under XP. The same makes taskkill!
Here a changed stop-lighttpd.bat :
=======================
@echo off
taskkill /F /IM lighttpd.exe
echo pause…
ping 127.0.0.1 >NUL
=======================
And here a cooler start-Batch:
=============================
@echo off
lighttpd.exe -f ..etclighttpd.conf
ping 127.0.0.1 -n 1>NUL
tasklist /FI “IMAGENAME eq lighttpd.exe”
echo.
echo pause…
ping 127.0.0.1 >NUL
=============================
The start batch you list, gives me a warning:
Invalid Argument/Option – ‘eq’.
I’m not sure these will work on NT and 2000, but I will keep a copy of each, and maybe replace process.exe if I find it works on NT and 2000. Thanks.
Upon further inspection, it doesn’t look like you need the following line at all:
tasklist /FI “IMAGENAME eq lighttpd.exeâ€
You could replace that line with:
echo Starting lighttpd…
REVISED start-lighttpd.bat could be:
===============================================
@echo off
lighttpd.exe -f ..etclighttpd.conf
ping 127.0.0.1 -n 1>NUL
echo Starting lighttd
echo .
echo .
echo .
ping 127.0.0.1 >NUL
EXIT
===============================================
Is anyone using perl with lighttpd for windows?
I have tried with cgi and I get a blank screen when executing hello.pl (a simple ‘hello world’ script). A hear a lot of disk access and a new lighttpd process is loaded and then unloaded. but I only get a blanck screen on my browser.
I have mod_cgi loaded and the following line in the conf file:
cgi.assign = ( “.pl” => “C:/Perl/bin/perl” )
I tried also with mod_fcgi and I get the following (long) error:
C:lighttpdsbin>2006-03-06 11:27:32: (mod_fastcgi.c.1023) the fastcgi-backend C
:/Perl/bin/perl failed to start:
2006-03-06 11:27:32: (mod_fastcgi.c.1027) child exited with status 0 C:/Perl/bin
/perl
2006-03-06 11:27:32: (mod_fastcgi.c.1030) if you try do run PHP as FastCGI backe
nd make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing ‘php -v’ and it should disp
lay ‘(cgi-fcgi)’ in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#pr
eparing-php-as-a-fastcgi-program
2006-03-06 11:27:32: (mod_fastcgi.c.1035) If this is PHP on Gentoo add fastcgi t
o the USE flags
2006-03-06 11:27:32: (mod_fastcgi.c.1325) [ERROR]: spawning fcgi failed.
2006-03-06 11:27:32: (server.c.834) Configuration of plugins failed. Going down.
I disabled mod_cgi and loaded mod_fcgi.
Thank you in advace! :-)
the server.bat doesn’t quite get the server going.
here is an expanded version (works on 2000 and XP which have reg.exe):
@ECHO OFF
instsrv.exe LighttpdServer c:lighttpdsbinsrvany.exe
reg QUERY HKLMSYSTEMCurrentControlSetServicesLighttpdServer >NUL: 2>&1
if ERRORLEVEL 1 GOTO InstServErr
reg ADD HKLMSYSTEMCurrentControlSetServicesLighttpdServerParameters /f
reg ADD HKLMSYSTEMCurrentControlSetServicesLighttpdServerParameters /v Application /d “C:lighttpdsbinlighttpd.exe -f C:lighttpdetclighttpd.conf” /f
echo Lighttpd is installed as service. Disregard the message about going to control panel.
goto end
:InstServErr
echo Error installing Lighttpd as server, HKLMSYSTEMCurrentControlSetServicesLighttpdServer registry key is missing.
well my last post is exhibiting some bizarre formatting but it seems if you copy it and paste it into text editor like notepad, it comes back to normal…
eugene: I get the following message after running that batch file:
The LighttpdServer service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.
This is on Windows XP Pro. Any thoughts?
reg.exe is located in %SYSTEMROOT%system32 which on most machines would be C:WINDOWSsystem32
I noticed on my machine at home that it wasn’t in my path and if thats the case, you will not have the extra keys and values in the registry. Try copying reg.exe into sbin or adding c:windowssystem32 to your path. If that doesn’t help, feel free to mail me with the any error output of the batch file.
I copied reg.exe to c:lighttpdsbin. Then I ran the batch file again. After the ‘completed successfully’ portion of the output, I get:
I think this is due to the ‘goto end’ line, and that makes sense since there’s nothing labelled ‘end’.
Suggestions?
> The LighttpdServer service on Local Computer started and then stopped
Try deleting the log files.
I had the same problems, because i initially launched lighty under my account, and it created log files, and then when i tried to launch it as a service it crashed when opening the logs because it was trying to open them under the system account, when they were owned by my user account.
I get the same thing after deleting the log files.
Maybe it is being cached for a certain amount of time and then discarded. Maybe that’s the obvious, but unfortunately I don’t know how to speed it up and increase its performance. Try the forum on lighttpd.net
Sorry, can’t help you then.
But something that *does* strike me – when i’m using my rails web application, it usually runs really snappy. But occasionally, if i leave it for 10 minutes and don’t access it, the next page i access is really slow, and after that its all snappy again.
Any ideas?
Ran into a problem. Tried running it, and nothing happened. Checked the logs, nothing. Rebooted, started, nothing.
I edited the batch start file, removed the exit, then ran it again. Got this error:
C:lighttpdsbin>start-lighttpd.bat
8 [main] ? (2416) C:lighttpdsbinlighttpd.exe: *** fatal error – system
shared memory version mismatch detected – 0x75BE0074/0x75BE0096.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:cygwinbin, where ‘x’ is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
Fixing it is easy enough, but the error is never apparent unless you remove the EXIT from the batch script.
Just an FYI. Thanks for the port!
Yes, this is a known problem. It’s the first thing I ask people to check when lighttpd won’t start for them – if another cygwin1.dll exists anywhere else on the system…
Thanks for the explanation though. And you’re welcome for the port.
I figured out my problem – frigging windows xp (not lighty or scgi or rails) defaults to having its ethernet port go into power-saving mode (ie turn off) if its not used for 15 minutes.
Lighty’s logs weren’t even showing that it had any idea of the requests coming its way – because the requests weren’t even getting past XP.
Grr, at least its fixed now.
Does anyone have any benchmarks or comparisons running lighttpd+SCGI+rails vs. webrick on production applications?
I’ve found that comparatively pages that take handle around 5-10 requests per second now handle between 10-20 requests per second.
chris hulbert: how did you modify the ethernet port so that it does not go into power saving mode?
Graham: I don’t have experience with this. Anybody else…?