NGINX as a Reverse Proxy
The web has traditionally consisted of, relatively speaking, simple websites. The past few years have seen that change, though. The modern web comprises as many complex SaaS applications as it does personal blogs, news sites, and so on. As the web evolves, so does the list of technologies used to power these applications. No longer is it enough to just be a fast static file server with a FastCGI interface. These days, we need to consider technologies such as web sockets, as well as the expanded complexity of web application architectures and the demands they put on the front line of our web stack.
Thankfully, NGINX was originally built not only as a fast static file server but also as a reverse proxy. This means that NGINX was always intended to sit in front of other backend servers, farm out requests to different servers on the internal network, and serve up the response to the end user. In this chapter, we will take a look at the basics of how to do this...