Beginner’s Guide

Beginner’s Guide Starting, Stopping, and Reloading Configuration Configuration File’s Structure Serving Static Content Setting Up a Simple Proxy Server Setting Up FastCGI Proxying This guide gives a basic introduction to nginx and describes some simple tasks that can be done with it. It is supposed that nginx is already installed on the reader’s machine. If it is not, see the Installing nginx page. This guide describes how to start and stop nginx, and reload its configuration, explains the s

autoindex_exact_size

Syntax: autoindex_exact_size on | off; Default: autoindex_exact_size on; Context: http, server, location For the HTML format, specifies whether exact file sizes should be output in the directory listing, or rather rounded to kilobytes, megabytes, and gigabytes.

autoindex_localtime

Syntax: autoindex_localtime on | off; Default: autoindex_localtime off; Context: http, server, location For the HTML format, specifies whether times in the directory listing should be output in the local time zone or UTC.

autoindex

Syntax: autoindex on | off; Default: autoindex off; Context: http, server, location Enables or disables the directory listing output.

autoindex_format

Syntax: autoindex_format html | xml | json | jsonp; Default: autoindex_format html; Context: http, server, location This directive appeared in version 1.7.9. Sets the format of a directory listing. When the JSONP format is used, the name of a callback function is set with the callback request argument. If the argument is missing or has an empty value, then the JSON format is used. The XML output can be transformed using the ngx_http_xslt_module module.

auth_request

Syntax: auth_request uri | off; Default: auth_request off; Context: http, server, location Enables authorization based on the result of a subrequest and sets the URI to which the subrequest will be sent.

auth_jwt_key_file

Syntax: auth_jwt_key_file file; Default: — Context: http, server, location Specifies a file in JSON Web Key Set format for validating JWT signature. Parameter value can contain variables.

auth_request_set

Syntax: auth_request_set variable value; Default: — Context: http, server, location Sets the request variable to the given value after the authorization request completes. The value may contain variables from the authorization request, such as $upstream_http_*.

auth_jwt

Syntax: auth_jwt string [token=$variable] | off; Default: auth_jwt off; Context: http, server, location Enables validation of JSON Web Token. The specified string is used as a realm. Parameter value can contain variables. The optional token parameter specifies a variable that contains JSON Web Token. By default, JWT is passed in the “Authorization” header as a Bearer Token. JWT may be also passed as a cookie or a part of a query string: auth_jwt "closed site" token

auth_http_pass_client_cert

Syntax: auth_http_pass_client_cert on | off; Default: auth_http_pass_client_cert off; Context: mail, server This directive appeared in version 1.7.11. Appends the “Auth-SSL-Cert” header with the client certificate in the PEM format (urlencoded) to requests sent to the authentication server.