Do you know any reason to use Apache instead of Nginx? I'm talking about a "new project" with no any legacy code or configuration.
updated:
Most popular reasons to use Apache are:
..it is OK for legacy app. But what about absolutely "new app 2013"?
What do you think?
BTW, I know about topics:
..and I can't find any pro for Apache there. Could you point me?
Apache HTTP Server has a multi-threaded architecture which lacks scalability. Whereas Nginx follows an asynchronous event-driven approach to handle multiple client requests. Its event-driven architecture is designed to facilitate better performance even under heavy traffic.
At serving static content, Nginx is the king! It performs 2.5 times faster than Apache according to a benchmark test running up to 1,000 simultaneous connections. Nginx serves the static resources without PHP having to know about this. On the other hand, Apache handles all those requests with that costly overhead.
Apache is an open-source web server. Nginx is a web server. It is also used as a reverse proxy server which revices the request from client and send the request to proxy server.
Apache HTTP web servers are used by over 67% of all web servers in the world. Apache web servers are easy to customize environments, they're fast, reliable, and highly secure. This makes Apache web servers a common choice by best-in-class companies.
Apache is still the most popular web server on the Internet, estimated to serve about 55% of all websites in existence, compared to nginx's 12% (in Jan 2013).
UPDATE (Apr 2015): Apache still has the largest share at about 40%, and nginx has grown to 15%. Check the above mentioned link for the latest figures.
UPDATE (Jul 2020): nginx has comfortably surpassed Apache in popularity at 37% vs 25%. Apache still has more hits on searches.
It is the oldest web server around, which means that you won't have any trouble finding people skilled in configuring it.
You're also slightly more likely to find help when searching the web. SO has ~80,000 tags for Apache, and ~40,000 for nginx.
Installation documents sometimes assume you're using Apache, often including .htaccess documentation, but not the equivalent nginx configuration:
My recommendation? Either are perfectly good choices, flip a coin if you can't find any compelling reasons either way.
Feb 2018 response here.
Apache is 47.4% (-3.3% 1 year), Nginx is 36.8% (+4.4% 1 year)
The trend is linear, by 2020 if nothing happens, Nginx will be the most used.
Nginx was made for supporting lots of concurrent requests, which modern apps usually do, like small Ajax requests, and less full page loads.
I've seen Benchmarks ( for a static resource), and Nginx MURDERS Apache, both in requests per seconds and RAM usage.
I've realized all this an hour ago, I’ve been using apache for lots of years, and I’m migrating just after writing this post.
Conclusion for 2018: Go for Nginx.
Bench:dreamhost Web-server-performance-comparison
Share:w3techs.com web_server
Share 2: netcraft.com web-server-survey
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With