If you are looking to host your WordPress site, Apache and Nginx are two attractive web server options – both open-source and free.
Both servers have a list of similar features. These include:
- Virtual hosts
- Static file serving
- Load balancing
- SSL/TLS support
- URL rewriting
- Reverse proxying
- Limited WebDAV
- Access controls
- Custom logging
- Server-side includes
- FLV streaming
In addition, Apache also has an administrative console and .htaccess.
Apache is a web server that is flexible – either thread-based, process-based or event-based where nginx is event-based only.
Nginx is one of the best known asynchronous servers around and Apache is the original process-based server. However, if you use Apache as a process-based server, it can perform badly when faced with a heavy load, consuming more RAM which degrades the performance.
Nginx serves static files much faster and uses less memory when tasked with concurrent requests. When tested by WordPress, it was found that nginx could capable handle 8000 requests per second. Apache could only handle 1000 life traffic requests per second. Nginx is also very easy to use, with everything from deployment onward easy.
Apache remains the most popular web server out there, with a market share of almost 40%. Nginx only had a 15% market share as of January 2015. However, the numbers for nginx are climbing steadily while Apache has gone from a high of almost 70% down considerably as people catch on.
Nginx is licensed under a Simplified BSD license which means that there is a lot of scope for software development which is related to Nginx. Apache uses the Apache License 2.0, one considered more permissive than truly open source.