NGINX vs. Apache

The server icon

For many users, the question of which web server to use can be nonexistent; however, for developers that are starting out, it can be a little daunting. It’s difficult to give a definitive answer of which is the best server to host your site on. You will have to think about your needs, determine your audience, and choose the one that works for you. In this post, we are going to take a look at some of the advantages and disadvantages of NGINX and Apache. This post will introduce you to the basic differences between Apache and NGINX web servers.

What is NGINX? Apache?

Nginx and Apache are two of the most popular options for hosting your site and each comes with their own set of pros and cons.

Apache

Apache was released in 1995 and played an important role in the growth of the internet. Nowadays, Apache serves more than 50% of websites worldwide. Due to this reason, Apache is the most widely supported and used server. Apache also comes bundled with many modules that you can install to fit your needs. Need more security? No problem! You can just write a few lines to your .htaccess file and have it work instantly. If a WordPress plugin, assuming you have WordPress installed, needs to access your .htaccess file, it will work!

However, there is one big disadvantage to using Apache as a web server. Apache is process-based, in other words, when a request is sent to the server a new thread, or process, is created which may slow things down.

NGINX

This is where NGINX comes in with is asynchronous non-blocking I/O to serve requests, in other words, an event-driven architecture. Wait, what? In short, instead of creating another process and having the server/client wait for it to end, NGINX allows many events to happen at once. NGINX is great for high-traffic websites and is used by many companies, including, but not limited to Netflix, Facebook and Hulu. Igor Sysoev released NGINX in 2002 for websites such as Rambler.

Sadly, NGINX, being the younger of the two, does not have as much support as Apache does. NGINX is gaining traction as time goes on.

Other Options

Other web servers include, but are not limited to: lighttpd, Jigsaw and many more.

Resources

Here are some resources that you can use to learn more:

http://en.wikipedia.org/wiki/Apache_HTTP_Server

http://codex.wordpress.org/Nginx

http://stackoverflow.com/questions/10542861/advantages-and-disadvantages-of-apache-vs-your-own-server

http://www.thegeekstuff.com/2013/11/nginx-vs-apache/

http://www.webdevelopersnotes.com/hosting/list_of_web_servers.php3

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-12-04

OUR SERVICE

Fan Commerce

ファンコマース

ファンとのダイレクトなコミュニケーションを実現して「感動体験」をビジネスに結びつけます。

Digital Marketing

デジタルマーケティング

未来を創造する価値ある「顧客体験」を実現する仕組みづくりを提案。