鼎鼎知识库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16冲突的配置指令.md 580B

3 jaren geleden
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 嵌套配置
  2. ```
  3. http {
  4. upstream {}
  5. split_clients {}
  6. map {}
  7. gco {}
  8. server { //根据域名找到server
  9. if(){}
  10. location {}//根据url找到location
  11. location {}
  12. }
  13. server {}
  14. }
  15. ```
  16. 指令的上下文`Context`
  17. ```
  18. Syntax: log_format
  19. Context: http
  20. Syntax: access_log
  21. Context: http, server, location, if in location, limit_except
  22. ```
  23. 指令的合并
  24. ```
  25. --值指令:可以合并。子配置不存在,直接使用父模块指令。子配置存在,覆盖父配置模块。
  26. root
  27. access_log
  28. gzip
  29. --动作类指令:不可以合并
  30. rewrite
  31. proxy_pass
  32. ```