|
12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- 嵌套配置
-
- ```
- http {
- upstream {}
- split_clients {}
- map {}
- gco {}
- server { //根据域名找到server
- if(){}
- location {}//根据url找到location
- location {}
- }
- server {}
- }
- ```
-
-
-
- 指令的上下文`Context`
-
- ```
- Syntax: log_format
- Context: http
-
- Syntax: access_log
- Context: http, server, location, if in location, limit_except
- ```
-
-
-
- 指令的合并
-
- ```
- --值指令:可以合并。子配置不存在,直接使用父模块指令。子配置存在,覆盖父配置模块。
- root
- access_log
- gzip
- --动作类指令:不可以合并
- rewrite
- proxy_pass
- ```
-
|