Mastering Nginx

(Ron) #1
Chapter 6

[ 157 ]

Summary


In this chapter, we have 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 a number of variables that we can use to construct


our configurations. We also explored the possibility of using the fastcgi module to
connect to the PHP-FPM applications and the uwsgi module to communicate with a


uWSGI server. The example configurations combined the directives discussed in this


chapter, as well as some discussed in other chapters.


The next chapter will introduce some modules that will help you as a developer
integrate NGINX into your application.

Free download pdf