Example Configuration:例子配置文件
Directives 指令
     index  首页

The ngx_http_index_module module processes requests
ending with the slash character (‘/’).
Such requests can also be processed by the
ngx_http_autoindex_module
and
ngx_http_random_index_module
modules.

这个nginx模型进程请求带有/结尾的请求,这类请求也可以被处理被ngx http自动首页模型和nginx的http随机首页模型

Example Configuration

例子配置

location / {
index index.$geo.html index.html;
}

Directives

Syntax: index file ...;
Default:
index index.html;
Context: http, server, location

Defines files that will be used as an index.
The file name can contain variables.
Files are checked in the specified order.
The last element of the list can be a file with an absolute path.
Example:

定义文件要求被作为首页使用。这个文件包括变量。文件在特定排序被选择。最后的列表的变量可以是一个有绝对路径的文件

index index.$geo.html index.0.html /index.html;

It should be noted that using an index file causes an internal redirect, and the request can be processed in a different location. For example, with the following configuration:

他应该被记录使用一个首页文件引发一个网络转发,并且请求在不同位置被处理。例如用下边的配置

location = / {
index index.html;
} location / {
...
}

a “/” request will actually be processed in the second location as “/index.html”.

最新文章

  1. 《Linux内核分析》第六周 读书笔记
  2. deep learning 的java库
  3. HBase-配置说明
  4. 递归循环JSON
  5. C辗转相除法求最大公约数的实现
  6. OLEDB读取EXCEL表格时,某些字段为空,怎么办?
  7. Javascript内存泄漏
  8. 在CentOS6上利用PXE+Kickstart+Apache+DHCP实现无人值守安装
  9. linux 分布式文件系统
  10. Html5知识点
  11. 新版的nuget包 PackageLicense 这样写
  12. GitHub和75亿美金
  13. C++学习(三十六)(C语言部分)之 链表2
  14. 尚硅谷springboot学习28-Docker简介
  15. python爬虫---BeautifulSoup的用法
  16. Laravel 5.5 FormRequest 自定义错误消息 postman调试时X-Requested-With设为XMLHttpRequest
  17. pip & Jinja2
  18. lombok的简单介绍(2)
  19. 使用C#的两种方式OracleClient组件和OleDB组件连接ORACLE数据库
  20. 安装nagios出现的错误

热门文章

  1. 统计MySQL数据表大小
  2. java.lang.ClassNotFoundException: org.springframework.context.event.GenericApplicationListener ----good
  3. 最短路径BellmanFord , Dijsktra
  4. dojo 资源库
  5. python 内建函数 type() 和 isinstance() 介绍
  6. sizeof()与strlen()的区别
  7. Android 第三方应用接入微信平台(2)
  8. hdu1052(田忌赛马 贪心)
  9. Hybris 预备知识学习列表
  10. CSS控制背景