Mastering Nginx

(Ron) #1
Appendix A

[ 247 ]

Directive Explanation Context/Default


proxy_pass Specifies the upstream server to


which the request is passed, in the
form of a URL.

Valid contexts:
location, if in
location, limit_
except
Default value: -

proxy_passerror
message


Useful in situations where the
backend authentication process
emits a useful error message to the
client.

Valid contexts: mail,
server
Default value: off

proxy_pass_header Overrides the disabled headers


set in proxy_hide_header,
allowing them to be sent to the
client.

Valid contexts: http,
server, location
Default value: -

proxy_passrequest
body


Prevents sending the body of the
request to the upstream server if
set to off.

Valid contexts: http,
server, location
Default value: on

proxy_passrequest
headers


Prevents sending the headers of
the request to the upstream server
if set to off.

Valid contexts: http,
server, location
Default value: on

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.


Valid contexts: http,
server, location
Default value: 60s

proxy_redirect Rewrites the Location and
Refresh headers received from
the upstream servers; useful for
working around assumptions
made by an application
framework.


Valid contexts: http,
server, location
Default value:
default

proxy_send_lowat If non-zero, NGINX will try
to minimize the number of
send operations on outgoing
connections to a proxied server. It
is ignored in Linux, Solaris, and
Windows.


Valid contexts: http,
server, location
Default value: 0

proxy_send_timeout The length of time that needs to
elapse between two successive
write operations to an upstream
server before the connection is
closed.


Valid contexts: http,
server, location
Default value: 60s
Free download pdf