Transferred from: https://www.cnblogs.com/aspphp/p/6135889.html
First of all, let's talk about old friends. Apache,apache HTTP Server (Apache) is the world's top-ranked Web server software, transliteration, Apache Software Foundation is an open source Web server, can run almost all computer platforms, Next Open API interface, any organization and individual can extend and add a variety of functions on it, to achieve their own customized features. Again because of the old, all the relevant documents are complete, even in the Windows platform many enthusiasts have developed a variety of graphics interface for it, even novice can start Apache. Since so it seized the Web server market of 70% rapidly.
Now let's talk about it. Nginx,nginx ("Engine X") is a high-performance HTTP and reverse proxy server and a IMAP/POP3/SMTP proxy server.
Nginx was developed by Igor Sysoev for the second rambler.ru site of Russian traffic. Second, it is open source, like Apache, and released under the Bsd-like agreement. It is the strongest and most competitive for its high performance and reverse proxies, both of which dominate the field.
In the early days of the internet, the size of the site is not very large, the traffic is very light, a site to visit a maximum of tens of thousands of IPs a day, this time Apache can fully meet the needs, people are more for it to develop a variety of modules, such as rewrite modules, access control lists, cache modules and so on. But with the rapid development of the Internet, the site of my visit to the exponential growth, large-scale web site in addition to increasing hardware input, the typical Web server Apache this time is also inadequate, so nginx began to rise, the original design is the Russian engineers for large-scale website to solve high concurrency design. So the doomed high concurrency is its eternal advantage. Again is the reverse proxy, now a large web site division of detail, which server processing data flow, which processing static files, these who command, usually with Nginx reverse proxy to the intranet server, so that the role of load balanced shunt. Again Nginx highly modular design, the writing module is relatively simple.
And our old friend Apache more than nginx what advantages, many small and medium-sized web sites are in use Apache, very important reason is that he appeared longer, stable, rich document, again in the rewrite more powerful than Nginx, more modules, as long as you can think of, have been developed.
In the face of these advantages and disadvantages, as a customer how should we choose? Although Nginx is stepping up to replace Apache, the market share is increasing, but as a webmaster, still need to choose from the following aspects as a starting point to select the appropriate Web server.
First, the site concurrency. If it is a small and medium-sized website, Apache is recommended, if large concurrency, and need to reverse proxy, choose nginx that is the right choice.
Second, if you need to use a lot of rewrite module, we recommend Apache.
Thirdly, according to the degree of familiarity. Administrator book order Apache, but read and develop Nginx Ability Limited, conservative with Apache.
The system resources is limited, but its own technology is very strong, it is recommended to use Nginx, because nginx on the system resources to take up a very small, with resources under the same level of Apache is almost 10 times times more.
The Web server chooses Apache or Nginx