FAQ

Page Discussion History

Difference between revisions of "HttpIndexModule"

(Add fallback information)
 
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__NOINDEX__
 +
 +
<span style="color:red">WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.</span>
 +
 
= Synopsis =
 
= Synopsis =
  
Line 5: Line 9:
 
= Directives =
 
= Directives =
 
== index ==
 
== index ==
{{Directive|name=index|args=filename [filename... [fallback]]|default=index.html|context=http, server, location|vars=no}}
+
<include wikitext nopre src="http://wiki.nginx.org/nginx.org/http/ngx_http_index_module/index.txt" />
  
 
Sets the default file to serve if a directory is requested by the client.  Multiple files can be specified.  If the first file isn't found, the second will be used and so on.  If the last entry begins with a /, and none of the earlier files are found, nginx will perform an internal redirect to this uri.
 
Sets the default file to serve if a directory is requested by the client.  Multiple files can be specified.  If the first file isn't found, the second will be used and so on.  If the last entry begins with a /, and none of the earlier files are found, nginx will perform an internal redirect to this uri.
Line 15: Line 19:
 
= References =
 
= References =
  
[http://sysoev.ru/nginx/docs/http/ngx_http_index_module.html Original Documentation]
+
[http://nginx.org/en/docs/http/ngx_http_index_module.html Original Documentation]

Latest revision as of 11:12, 10 April 2014


WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.

Contents

Synopsis

Sets the default file to serve if a directory is requested by the client.

Directives

index

Syntax: index file ...
Default: index.html
Context: http
server
location
Reference:index


Sets the default file to serve if a directory is requested by the client. Multiple files can be specified. If the first file isn't found, the second will be used and so on. If the last entry begins with a /, and none of the earlier files are found, nginx will perform an internal redirect to this uri.

  index index.html index.php /index.php;

References

Original Documentation