User Tools

Site Tools


network:nginx_usage_and_configuration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
network:nginx_usage_and_configuration [2019/11/16 10:26]
zhwiki [模块配置]
network:nginx_usage_and_configuration [2021/01/10 08:10]
zhwiki removed
Line 301: Line 301:
 ngx_http_core_module模块支持名称与Apache Server变量匹配的内嵌变量。 这些是代表客户端请求标头字段的变量,例如%%$http_user_agent%%,%%$http_cookie%%等,另外还有其他变量。 ngx_http_core_module模块支持名称与Apache Server变量匹配的内嵌变量。 这些是代表客户端请求标头字段的变量,例如%%$http_user_agent%%,%%$http_cookie%%等,另外还有其他变量。
  
 +==== ngx_http_autoindex_module ====
  
 +ngx_http_autoindex_module模块处理以斜杠(''/''​)结尾的请求,并生成目录列表。 通常,当ngx_http_index_module模块找不到index文件时,会将请求传递给ngx_http_autoindex_module模块。
  
 +=== autoindex ===
  
 +  * Syntax: autoindex on | off;
 +  * Default: autoindex off;
 +  * Context: http, server, location
  
 +启用或禁用目录列表输出。
 +
 +=== autoindex_exact_size ===
 +
 +  * Syntax: autoindex_exact_size on | off;
 +  * Default: autoindex_exact_size on;
 +  * Context: http, server, location
 +
 +对于HTML格式,指定是在目录列表中输出确切的文件大小,还是四舍五入为KB,MB和GB。
 +
 +=== autoindex_format ===
 +
 +  * Syntax: autoindex_format html | xml | json | jsonp;
 +  * Default: autoindex_format html;
 +  * Context: http, server, location
 +
 +设置目录列表的格式。
 +
 +使用JSONP格式时,将使用回调请求参数设置回调函数的名称。 如果参数缺失或值为空,则使用JSON格式。
 +
 +可以使用ngx_http_xslt_module模块转换XML输出。
 +
 +=== autoindex_localtime ===
 +
 +  * Syntax: autoindex_localtime on | off;
 +  * Default: autoindex_localtime off;
 +  * Context: http, server, location
 +
 +对于HTML格式,指定输出目录列表中的时间使用本地时区还是UTC。
 +
 +==== ngx_http_index_module ====
 +
 +ngx_http_index_module模块处理以斜杠(''/''​)结尾的请求。 此类请求也可以由ngx_http_autoindex_module和ngx_http_random_index_module模块处理。
 +
 +=== index ===
 +
 +  * Syntax: index file ...;
 +  * Default: index index.html;
 +  * Context: http, server, location
 +
 +定义将用作index的文件。 文件名可以包含变量。 文件以指定顺序检查。 列表的最后一项可以是具有绝对路径的文件。 例如:
 +
 +  index index.$geo.html index.0.html /​index.html;​
 +
 +==== Other Module ====