Summary
In this chapter, we explored a number of directives used to make NGINX serve files over HTTP. Not only does the http
module provide this functionality, but there are also a number of helper modules that are essential to the normal operation of NGINX. These helper modules are enabled by default. Combining the directives of these various modules enables us to build a configuration that meets our needs. We explored how NGINX finds files based on the URI requested. We examined how different directives control how the HTTP server interacts with the client, and how the error_page
directive can be used to serve a number of needs. Limiting access based on bandwidth usage, request rate, and number of connections is all possible.
We saw, too, how we can restrict access based on either IP address or through requiring authentication. We explored how to use NGINX's logging capabilities to capture just the information we want. Pseudo-streaming was examined briefly, as well. NGINX provides us with...