Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Mar 07, 2005 7:18 am 
Offline
Junior Member

Joined: Fri Feb 25, 2005 7:34 pm
Posts: 26
Hi,

I was just wondering if anyone has considered using / is using lighttpd (http://www.lighttpd.net/) instead of Apache.

Lighttpd seems to be designed to take up a small amount of memory - one of the areas in which linodes are limited.

If you are using it, what are your experiences? Does it take up less memory than apache? Is it stable? Is it hard to configure?

Thanks :)


Top
   
 Post subject:
PostPosted: Wed Mar 09, 2005 1:01 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
I use thttpd (http://www.acme.com/software/thttpd) which is absolutely tiny. It has less functionality than lighttpd but if you just want a basic web server with simple CGI support then you can't get much smaller than thttpd :-) I currently have it configured for 3 virtual servers and "ps" shows it has a VSZ of 2212, with an RSS of 652. That's tiny :-)

No fast CGI, not much in the way of functionality at all. But for a basic web server, it does the job :-)

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2005 6:16 am 
Offline
Junior Member

Joined: Sun Mar 13, 2005 4:42 am
Posts: 40
Can it support PHP with all it's extensions? and virtual hosts?


Top
   
 Post subject:
PostPosted: Sun Mar 13, 2005 9:14 am 
Offline
Senior Member

Joined: Fri Feb 13, 2004 11:30 am
Posts: 140
Location: England, UK
Well, much as it's not recommended by the PHP team, you can run PHP through the CGI interface, so yes, thttpd could support it if set up properly.

As for virtual hosts, I believe he already mentioned that he had 3 running. :D


Top
   
 Post subject:
PostPosted: Tue Mar 15, 2005 9:39 am 
Offline
Senior Newbie

Joined: Wed Mar 02, 2005 11:38 am
Posts: 16
Website: http://webmages.com/
I'm about to give lighttpd a try myself. Looks like the folks over at textdrive love it. Especially check out the benchmarking post.


Top
   
 Post subject:
PostPosted: Fri Apr 08, 2005 9:12 am 
Offline
Senior Newbie

Joined: Wed Mar 02, 2005 11:38 am
Posts: 16
Website: http://webmages.com/
hallow wrote:
I'm about to give lighttpd a try myself. Looks like the folks over at textdrive love it. Especially check out the benchmarking post.


Well, I've gotten it up and running (http://webmages.com/). I'm using an externally spawned php fastcgi server, with two instances of lighttpd running (one ssl, one not) sharing the same php instance. Php also has eAccelerator installed. I've got rewrite rules setup and working with my wordpress installation, although I haven't gotten rules working with my gallery2 install, so for now no permalinks there, but otherwise it works.


Top
   
 Post subject:
PostPosted: Fri Apr 08, 2005 9:16 am 
Offline
Senior Member

Joined: Sun Nov 14, 2004 6:37 pm
Posts: 138
Website: http://oldos.org
WLM: jasonlfaulkner@hotmail.com
Yahoo Messenger: jasonfncsu
AOL: jaylfaulkner
Location: NC, USA
I'm doing the exact same.

http://xen.oldos.org <-- running on my xen beta linode, gentoo 2005.0, lighttpd+php-fcgi+mysql 4.0

http://v7forum.oldos.org <-- running on my main UML linode, debian sarge, apache2+mod_php+mysql 4.1

_________________
Jay Faulkner
http://oldos.org


Top
   
 Post subject:
PostPosted: Fri Apr 08, 2005 9:40 am 
Offline
Senior Member
User avatar

Joined: Mon Jun 23, 2003 1:25 pm
Posts: 260
Any one know what lighttpd is like for perl scripts and ssl?

Adam


Top
   
 Post subject:
PostPosted: Fri Apr 08, 2005 9:48 am 
Offline
Senior Member

Joined: Sun Nov 14, 2004 6:37 pm
Posts: 138
Website: http://oldos.org
WLM: jasonlfaulkner@hotmail.com
Yahoo Messenger: jasonfncsu
AOL: jaylfaulkner
Location: NC, USA
adamgent wrote:
Any one know what lighttpd is like for perl scripts and ssl?

Adam


You have to run a separate process for ssl.

Perl scripts have to be run as a cgi or fcgi.

_________________
Jay Faulkner

http://oldos.org


Top
   
 Post subject:
PostPosted: Fri Apr 08, 2005 10:17 am 
Offline
Senior Newbie

Joined: Wed Mar 02, 2005 11:38 am
Posts: 16
Website: http://webmages.com/
Have you played around with remote servers running fastcgi (lighthttpd on one box, php on another)? Does the other box need to have it's own copy of the website?

If not, maybe whoevers doing the hosted mysql service could offer a hosted php service. :)


Top
   
 Post subject:
PostPosted: Fri Apr 08, 2005 10:25 am 
Offline
Senior Newbie

Joined: Wed Mar 02, 2005 11:38 am
Posts: 16
Website: http://webmages.com/
Jay wrote:
adamgent wrote:
Any one know what lighttpd is like for perl scripts and ssl?

Adam


You have to run a separate process for ssl.

Perl scripts have to be run as a cgi or fcgi.


But don't be too concerned about the seprate process thing. They can share the same backend (both of mine use the same PHP), so the total ram useage increase is about 600k (which is about 1/2 of what the first process uses for me).

PHP is kind of a hog (uses about 48m between all the processes here), I'm sure perl is too. Maybe after after lighttp dev starts to slow down we can get them to work on a new scripting language. :)


Top
   
 Post subject: Lighttpd 1.4.6
PostPosted: Thu Oct 13, 2005 4:35 pm 
Offline
Senior Newbie

Joined: Thu Sep 22, 2005 9:15 am
Posts: 13
Website: http://www.paulmarsh.net
Just wanted to chime in. I am using lighttpd for Rails and FastCGI, couldn't be happier at the moment.

Combined with SQLite and I'm a happy camper with my UML Linode 80.


Top
   
 Post subject:
PostPosted: Tue Nov 01, 2005 5:59 am 
Offline
Senior Member

Joined: Sat Dec 04, 2004 5:36 pm
Posts: 145
Only comment: lighttpd looks nice. I've got a friend on OpenBSD running it.

The only oddity is when he runs it with IPv6 enabled, all v6-based requests that hits lighttpd is returned up to precisely 16K worth of data before lighttpd closes the connection.

No obvious config file or code issue. He can get > 16K with any other v6-based apps, so don't think the issue is with his TCP stack.

Just FYI, in case you need to run lighttpd with IPv6; test!

Other than that, looks to be pretty good.


Top
   
PostPosted: Tue Nov 01, 2005 3:10 pm 
Offline
Senior Member

Joined: Sun Dec 19, 2004 6:46 pm
Posts: 58
If you use scripting, beware that Lighttpd's default dir for fastcgi scripts can change with each restart. This means if you don't explicitely set the current dir within your scripts, it may break at unexpected times.

For example, the following will make the default dir for fastcgi scripts to be /

Code:
cd /
/etc/init.d/lighttpd restart


And the following will make the default dir for fastcgi scripts to be /usr/bin:

Code:
cd /usr/bin
/etc/init.d/lighttpd restart


Whether this is a serious security flaw or merely a compatibility annoyance with scripts that run fine in Apache can be debated elsewhere. But knowing about it helps avoid issues.


Top
   
PostPosted: Mon Jan 23, 2006 8:24 am 
Offline
Newbie

Joined: Sun Jan 22, 2006 8:54 pm
Posts: 2
Location: England, UK
Just wondered if anyone had tried lighttpd with virtual hosts and url-rewriting?

The vhosts system looks like it might make more sense if you're literally hosting sites as:

  • /websites/example1.com
  • /websites/example2.com
  • /websites/example3.com


But if you wanted to do anything more exotic, you'd need to write lots of rewrite rules, by the looks of things. Anyone tried this at all? Is it faster than the equivalent Apache setup? (I should imagine if you're using 'simple vhosts' like above, it would in all probability be faster)

Also, it's not overly clear from the lighttpd website whether URL rewriting is specified in the main configuration file, or whether it can be set per-directory like in Apache's .htaccess files. If not, that could be quite a limitation which would put me - and probably others - off.

It seems that lighttpd might work better for what I want than Apache might, but I'm not yet sure.

Has anyone here tried this?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group