Lite version
Apache: Famous earlier, about 09 years is the most popular period, powerful, can be configured according to the needs of the process, based on thread or event-based, but consumes more memory, high demand for hardware, memory is the most important factor affecting the performance of the server, on the VPS can not be very good support.
Nginx: Belongs to the rising star, the application is more and more widespread in recent years, the main feature is the low memory consumption, can run well on the VPS, this is because Nginx is an event-based asynchronous server, so after receiving a new request, there is no need to create too many threads.
Nginx concurrency number high, processing requests asynchronous non-blocking, one process multiple connections, while Apache is a synchronous multi-process, a process one connection, belong to the blocking type.
Nginx occupies a small amount of resources and memory, highly modular, simple configuration, Apache configuration is relatively complex.
Nginx is suitable for handling static files and reverse proxies.
Apache's rewrite feature is more powerful, support for dynamic pages is better and super stable.
Apache support for PHP is relatively simple, nginx needs to cooperate with other backend use, Apache components are also richer.
The general front end is Nginx, the back end is Apache.
Apache vs. Nginx