I've traditionally deployed my sites under apache, simply by default. I've heard things about NGinX though and I'm wondering under which conditions it would be superior. In addition to apache and Nginx, what the other options are for webservers and what are their benefits?
One of the web servers used to have a large spike in load every few hours. After looking into the logs, I found out when the load spike happened, there where a lot of people looking at the gallery.
So I off-loaded 99% of the static content from apache to nginx. apache was left to serve all of the php. The load on my web servers dropped to a nice low number and with no more high load spikes.
If you are looking to get more out of your servers, definitely have some light-weight server serve all the static content.
Apache can be a bit heavy, and can fall over when under heavy load. There are lighter weight servers available, including nginx, lighttpd, and cherokee.
These lightweight options can be set up to serve static files quickly, and delegate dynamic server-side work to Apache.
There are a PILE of webservers out there. I expect depends on the usage you want. Apache will do most of what people want, it's known good, well updated, and will run on nearly any hardware and operating system combination.
For a comparison of web servers, check Comparison of web server software.
Netcraft tracks market share of web servers & according to them, IIS stands second after Apache with a 26.03% share (as of July 2010). This is based on a survey of 205+ million sites
This link has reasons why you should check out IIS7 if you use Apache today
It really depends on what you're doing.
If you only have static content, you don't need Apache. nginx or lighttpd would serve you just fine.
If you have a mix of static and dynamic (well, Perl or PHP), but a small site, you can still get by with one of those alternative plus FastCGI, or just throw the whole thing into Apache.
If you're serving Ruby along with your static content,
For Python (my area of expertise), you can have Apache use
If you don't have a ton of heavy traffic, look into new systems like
Java and other languages, I have no idea about.
The great thing about using nginx, though, is that it's amazingly configurable. So set up a couple of static servers with different subdomains, one each for CSS, images, and JS. That way you help avoid the limit of 2 files per domain at a time. Set up several servers and then set up an nginx proxy/load-balancer in front of them to make sure all of your static content is always available.
Basicaly, YES, look at more than just Apache!