views:

404

answers:

3

I am using lighty for windows, yes i know it's not linux, but atm can only afford local hosting, which then allows me to do a lot of learning and practicing my web skills.

I am aware that fast-cgi, does not work on windows, but I am wondering what other ways, to improve performance are there?

Also I was wondering how to hide all those lightpd.exe window/boxes that come up, everytime anyone or a bot visits the site...can lighttpd be run from the background? I am running it as a service, and that is fine...

But all in all, why is there so little support for lighty on windows?

And I really could care less for 1 more lecture on why everything should be on linux or windows...That discussion is really a waste of time...mine and yours...

If you have some useful information, I definitely want to hear it.

I guess I am one of those guys, who always wants to learn how to improve things, it's like a drug for me, to eak out any percent more in performance...

Like for example, I have added a subdomain, because yslow loves subdomain hosting of images,css and javascript...

I really like lighty, just hope I am not the only one there...using it on windows...and all the lighty for windows sites seem to be dead...or forgotten...

Thank You for your time..

-Craig

+2  A: 

By local hosting, I'm guessing you mean on your own box, so essentially free. If you're not too strapped for cash, you could probably pick up a cheap box, and install a headless linux on there. Well, that's only if you're adverse to using linux as a desktop...

So, first, since you're only learning, I'm assuming you're not trying to put up a production site yet, so you can shut down lighty when you're not using it (getting rid of the boxes popping up for bots). Excuse me if this is unacceptable, since there is probably a solution out there (and how are you getting bots for a sandbox site? oO). Same goes for the performance: it's just a testing grounds, so optimization shouldn't matter too much yet (don't worry about it: remember the maxim that premature optimization is the root of all... something). If you still want fastcgi, there's another stackoverflow question/answer on that: http://stackoverflow.com/questions/766779/fastcgi-on-windows-and-lighttpd. Also, check out scgi, which might be a different story on windows.

Also, here's some thoughts from Atwood on yslow: codinghorror.com/blog/archives/000932.html

Finally; last I checked, lighty was no where near as popular as apache, meaning a much smaller user base. When you also consider IIS, then lighty wouldn't really have that many users under Windows. Just noting, you might have a not-so-smooth road ahead of you if you want to continue with lighttpd on windows. Also note, you'll probably end up shifting the server to another box or offsite eventually. I've served stuff from my desktop, and it's not all too fun in the long run.

thenoviceoof
All good points, but the money isn't here, so i must stick to windows. I just want to learn more how to maximize lighty, or what to have with it, to deliver better performance.
crosenblum
I appreciated the info on lighty and yslow, i really do...but as i said i was support for lighty on windows...i mean to help grow a community...great web server..
crosenblum
A: 

Try nginx - another lightweight alternative to apache, fast and stable. fastcgi on windows works ok. Regarding your question - I think the reason is that lighttpd is loosing its popularity, look at the web server stats. So less people use it, less features are tested, more bugs are lurking around.

ygrek
+1  A: 

I also run lighttpd for Windows, but I've made my own very well optimized lighttpd mod with PHP and Python support which I run from a USB pen drive, since I switched to Windows 7 all the command line windows keep appearing whenever I access the server (I also don't know how to keep this from happening).

I did several things to make my lighttpd server faster (since I run it from a USB pen drive):

  • disable all kinds of logs (specially access logs)
  • keep the config file as small as possible (mine has only 20 lines)
  • activate PHP only on .php files, Python only on .py files
  • disable all kinds of modules that you don't need, like SSL and so on (I only have 5)

Here it is, my config file:

var.Doo = "C:/your/base/path/here"

# LightTPD Configuration File

server.port = 80
server.name = "localhost"
server.tag = "LightTPD/1.4.20"
server.document-root = var.Doo + "/WWW/"
server.upload-dirs = ( var.Doo + "/TMP/" )
server.errorlog = var.Doo + "/LightTPD/logs/error.log"
server.modules = ( "mod_access", "mod_cgi", "mod_dirlisting", "mod_indexfile", "mod_staticfile" )

# mod_access
url.access-deny = ( ".db" )

# mod_cgi
cgi.assign = ( ".php" => var.Doo + "/PHP/php-cgi.exe", ".py" => var.Doo + "/Python/python.exe" )

# mod_dirlisting
dir-listing.activate = "enable"

# mod_indexfile
index-file.names = ( "index.php", "index.html" )

# mod_mimetype
mimetype.assign = ( ".css" => "text/css", ".gif" => "image/gif", ".html" => "text/html", ".jpg" => "image/jpeg", ".js" => "text/javascript", ".png" => "image/png", ".txt" => "text/plain", ".xml" => "text/xml" )

# mod_staticfile
static-file.exclude-extensions = ( ".php", ".py" )

And the modules that I've active:

  • mod_access
  • mod_cgi
  • mod_dirlisting
  • mod_indexfile
  • mod_staticfile

Bottom line is, even when running from the USB pen the server still is blazing fast.

PS: I also considered switching to nginx but given the current performance I can get and the even smaller user base of nginx I decided I would keep LightTPD.

Alix Axel
Your conf is much simpler than mine, but then i was at one time doing multiple sites...And it's funny about the command boxes showing up, some days they never show up and it's running thru the service, and other days it's popping up all the time...Not sure how to disable that...Or at the very least minimize it...But i really like that i am not only one using lighty for windows,there are prolly a billion questions we can help each other with, to feel not so alone in all the lighty for linux crowd :)Nice answer...
crosenblum
I see, I use Lighty only for developing purposes not as a live server, but I guess I could set up a bunch of different USB pens and run a server on each one, each server on a different port of course. One question, do you also use Windows 7? I'm asking this because back in the Windows XP days the command windows never appeared.
Alix Axel
I use winxp pro sp3 at home.
crosenblum
@crosenblum: That's weird I had none of those problems on WinXP. Unfortunatly I lost my pen drive and I don't remember the command I had used to keep the command prompts from showing up. Maybe it would be a good idea to ask this same question on SuperUser.com or maybe even ServerFault.com.
Alix Axel