best webserver.

Stuff that don´t fit in the other categories.
Post Reply
User avatar
l0ngb1t
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 598
Joined: 15 Apr 2009, 16:00
14
Contact:

best webserver.

Post by l0ngb1t »

i was searching for the best free webserver, and of course apache was the first to cross my mind, how ever after more search i have read that lighttpd + fastCGI is faster than apache, but apache does have fastcgi mode so does it make it faster ?
and which one is better in a production environment ?
and if someone have another good combination i will be very thankful.
There is an UNEQUAL amount of good and bad in most things, the trick is to work out the ratio and act accordingly. "The Jester"

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: best webserver.

Post by ayu »

From my experience lighttpd is faster, but a little more annoying to configure with stuff like PHP and such.
Apache on the other hand, is also very fast, and can be made faster with the proper modules and configs.
Apache has a lot more options as far as I know, and can be configured more to your needs.

So I would recommend Apache.

But ask bad_brain about it, as he works with this on a daily basis.
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
18
Location: In your eye floaters.
Contact:

Re: best webserver.

Post by bad_brain »

yep, you can run apache with fastcgi, but I recommend to use fcgi instead. fastcgi might have some more features than fcgi, but it's not as well maintained and there have been some problems with fastcgi in context with php because some fastcgi features are not supported by php.
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html" onclick="window.open(this.href);return false;

it's not just possible to use mod_fcgi instead of mod_php, I even highly recommend it because of the way better security.
imagine you run multiple websites by virtual hosts, with mod_php every apache process (and everywebsite) that is created by people visiting the sites is owned by www-data. so if website A is compromised and the attacker gained the rights of the www-data user he has the rights to manipulate ALL websites...because they all belong to the same owner/group.
with fcgi (and fastcgi) every website runs in its own environment, so website A has user0001 as owner while website B has user0002 as owner, if one website is compromised the attacker can not manipulate the other sites anymore.

it also matters as what MPM you run apache, the prefork MPM is more resource friendly but slower, while the worker MPM occupies more RAM (because of the way it works, it keeps processes open for a specific time) but responds faster.
http://httpd.apache.org/docs/2.0/mod/worker.html" onclick="window.open(this.href);return false;
Image

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

Re: best webserver.

Post by maboroshi »

I run NginX uWSGI and web2py! I have little experience with it but it carries less overhead than apache in terms of ram with Python (or so I have read)

eppik
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 212
Joined: 26 Mar 2006, 16:00
18
Location: Infinite Loop
Contact:

Re: best webserver.

Post by eppik »

As Mabaroshi said, nginx is a great choice, using apache even a single computer can use slowlorris to bring the server to a crawl if you dont have the right configs to soften the blow

Post Reply