Mastering Nginx

(Ron) #1

Directive Reference


[ 250 ]

Directive Explanation Context/Default
resolver Configures one or more name
servers to be used to resolve
upstream server names into IP
addresses. An optional valid
parameter overrides the TTL of the
domain name record.

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

resolver_timeout Sets the timeout for name
resolution.

Valid contexts: http,
server, location
Default value: 30s
return Stops processing and returns the
specified code to the client. The
non-standard code 444 will close
the connection without sending
any response headers. If a code
additionally has text accompanying
it, the text will be placed in the
response body. If instead, a URL
is given after the code, that URL
will be the value of the Location
header. A URL without a code is
treated as a code 302.

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

rewrite Refer to the Rewrite module
directives table in the Introducing
the rewrite module section in
Appendix B, Rewrite Rule Guide.

Valid contexts:
server, location,
if
Default value: -
rewrite_log Activates notice level logging of
rewrites to the error_log.

Valid contexts: http,
server, if in
server, location,
if in location
Default value: off
root Sets the path to the document root.
Files are found by appending the
URI to the value of this directive.

Valid contexts: http,
server, location,
if in location
Default value: html
satisfy Allows access if all or any of
the access or auth_basic
directives grant access. The default
value all indicates that a user
must come from a specific network
address and enter the correct
password.

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