Which Is a Good Starting Point For Beginner? Apache, Nginx or Cherokee?

Any of these web server software i.e., Apache, Nginx and Cherokee is suitable for my website at the moment. And I am learning sysadmin to be able to manage my server (and not for a job).

For a beginner that I am, any web server is equally new. So, please take a look at my requirements and kindly suggest a web server software to start with (and sit on... like forever):

  • Scalability
  • low resource footprint
  • support for PHP, MySQL, APC, Memcached, Meteor - - all for a wordpress website
  • useful now and in the long-term as my website's traffic increases
  • load tolerant
  • everything else...

As you can see, I am still in the beginner's phase. So, please don't come saying this is a controversial question. It definitely abides by SF's rules (or hopefully so, I just read them).


Solution 1:

Apache sure is your safest starting point. Not that it's necessarily easier than the others, but the software you want to run on top of it has been tested with Apache with 100% certainty. Usually everything works with other web servers too, but unless you already have experience about typical gotchas, Apache is the way to go for you.

Performance-wise Apache is fine. nginx, lighttpd and other more performant web servers starts to matter only in corner-cases like YouTube. For your typical web sites (where with a decent server & network bandwidth 'typical' can easily be tens of millions of page loads per month) Apache won't be the bottleneck; it can handle thousands and thousands of static http requests per second without sweat, and with dynamic applications your PHP script / database / whatever is the actual bottleneck, anyway.

If Apache starts to be your bottleneck, you most likely need to scale out with more hardware. Though one scenario where nginx & lighttpd truly shines is serving out lots of large static content, such as video files.

Solution 2:

I think Apache is the one with most tutorials and people that can help. Plus the combination (L)AMP - Linux Apache Mysql PHP works right from the start and is very easy to set up. Memcached also works fine with Apache and your mySQL database, if your site needs to scale to an intermediate size. I started with a simple LAMP setup and later installed Memcached when the traffic increased to several sites. With the help of some tutorials, everything was quite straightforward.

Solution 3:

Apache is probably a safe bet for almost any "beginner's" scenario, mostly because of the vast expanse of documentation available for it.

NGINX is a great web server (among other things), but trying to integrate PHP and/or CGI with it requires some effort and hackery. It is very lightweight, and can do a lot of fancy stuff (like reverse-proxying), but it's probably not the best thing to bootstrap yourself on.

Solution 4:

You're asking for the moon on a stick..

Apache a is very modular, easy to configure and updated web/application server. It is however not great for handling high volume traffic when doing application processing (like PHP), as it eats away enormous amounts of RAM for each children.

Nginx is a great webserver. It requires little to no resources (I've heard about production sites using 25MB ram and 2-3% CPU). It is however not an application server at all. It serves static content, or it proxies. Nothing else.

I've used both for a long, long time. Nginx+PHP-FPM is fun to set up and tweak, but often not necessary.