Similar to the previous chapter, the first step towards establishing the new architecture will be to discover the appropriate module. The default Nginx build comes with the proxy module, which allows forwarding of HTTP requests from the client to a backend server. We will be configuring multiple aspects of the module:
Basic address and port information on the backend server
Caching, buffering, and temporary file options
Limits, timeout, and error behavior
Other miscellaneous options
All these options are available via directives which we will learn to configure throughout this section.
The first set of directives will allow you to establish basic configuration such as the location of the backend server, information to be passed, and how it should be passed.
Directive |
Description |
---|---|
Context: |
Specifies that the request should be forwarded to the backend server by indicating its location: For TCP sockets, the syntax is |