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.
If you download 1.4.10a, 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
{ 51 comments }
Next Comments →
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_MACHINE\SYSTEM\CurrentControlSet\Services\LightyHTTPServer
[Create this ('LightyHTTPServer') key, if it does not already exist.]
‘DisplayName’ parameter should contain this string.
LightyHTTPServer
———————————————————————
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LightyHTTPServer
‘ImagePath’ parameter should contain this string.
“C:\lighttpd\sbin\srvany.exe”
———————————————————————
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LightyHTTPServer\Parameters
‘Application’ parameter should contain this string as value
“C:\lighttpd\sbin\lighttpd.exe” -D -f C:\lighttpd\etc\lighttpd.conf -m C:\lighttpd\lib
———————————————————————
Notes:
1) ‘HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LightyHTTPServer’ 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:\lighttpd\logs ? (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:\lighttpd\tmp does not exist, by all means create it and try it.
I have download http://www.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 ..\etc\lighttpd.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 ..\etc\lighttpd.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:\lighttpd\sbin>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 with the following lines in the conf file:
fastcgi.server = ( “.pl” =>
( “localhost” =>
(
“port” => 1026,
“bin-path” => “C:/Perl/bin/perl”,
)
)
)
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:\lighttpd\sbin\srvany.exe
reg QUERY HKLM\SYSTEM\CurrentControlSet\Services\LighttpdServer >NUL: 2>&1
if ERRORLEVEL 1 GOTO InstServErr
reg ADD HKLM\SYSTEM\CurrentControlSet\Services\LighttpdServer\Parameters /f
reg ADD HKLM\SYSTEM\CurrentControlSet\Services\LighttpdServer\Parameters /v Application /d “C:\lighttpd\sbin\lighttpd.exe -f C:\lighttpd\etc\lighttpd.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, HKLM\SYSTEM\CurrentControlSet\Services\LighttpdServer 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?
Next Comments →
Comments on this entry are closed.
{ 1 trackback }