The Setup

I recently decided that I wanted to learn about Nginx. You may know that Nginx is a web server that has been growing in popularity in the last few years. People use it as an alternative to more traditional web servers like Apache or IIS. They even use it in conjunction with Apache or IIS with Nginx acting as a reverse proxy. Nginx excels at serving up static content and can use fewer resources than Apache or IIS if properly configured, in some scenarios. The one drawback that I had heard about with Nginx was it doesn’t have the breadth of modules that you find in Apache. To illustrate one of the differences, under Apache PHP is loaded as a module while Nginx loads it via FastCGI. Using FastCGI Nginx is able to get comparable performance with potentially lower resource usage.

In terms of configuration Apache is certainly an acquired taste, but once you get it, it is not all that complicated and many of the directives are well documented in the Apache docs. Coming from Apache, configuration of Nginx is surprising easy to pick up. Several things that take 2 or 3 lines on Apache take only 1 on Nginx.
Read Full Article