Mastering Nginx

(Ron) #1

NGINX as a Reverse Proxy


[ 68 ]

Directive Explanation
proxy_http_version The HTTP protocol version used to
communicate with upstream servers
(use 1.1 for keepalive connections).
proxy_ignore_client_abort If set to on, NGINX will not abort the
connection to an upstream server if the
client aborts the connection.
proxy_ignore_headers Sets which headers can be disregarded
when processing the response from the
upstream server.
proxy_intercept_errors If enabled, NGINX will display a
configured error_page error instead of
the response directly from the upstream
server.
proxy_max_temp_file_size The maximum size of the overflow file,
written when the response doesn't fit
into memory buffers.
proxy_pass Specifies the upstream server to which the
request is passed, in the form of a URL.
proxy_pass_header Overrides the disabled headers set in
proxy_hide_header, allowing them
to be sent to the client.
proxy_pass_request_body Prevents sending the body of the request
to the upstream server if set to off.
proxy_pass_request_headers Prevents sending the headers of the
request to the upstream server if set to
off.
proxy_read_timeout Specifies the length of time that needs
to elapse between two successive read
operations from an upstream server,
before the connection is closed. Should
be set to a higher value if the upstream
server processes requests slowly.
proxy_redirect Rewrites the Location and Refresh
headers received from the upstream
servers; useful for working around
assumptions made by an application
framework.
Free download pdf