Nginx学习笔记——配置文件结构
来源:互联网 发布:手机安全检测软件 编辑:程序博客网 时间:2024/05/21 02:36
以下内容翻译自Nginx官方文档,[原文地址]。
nginx由模块组成,这些模块由配置文件中的指令进行控制。
nginx consists of modules which are controlled by directives specified in the configuration file.
指令分为简单指令和块指令。
Directives are divided into simple directives and block directives.
一个简单指令由名称和参数组成,用空格分开,以分号结束。
A simple directive consists of the name and parameters separated by spaces and ends with a semicolon (;).
一个块指令和简单指令有相同的结构,但是以花括号包围的一组额外命令结尾,而不是以分号结尾。
A block directive has the same structure as a simple directive, but instead of the semicolon it ends with a set of additional instructions surrounded by braces ({ and }).
如果一个块指令可以再花括号内包含其他指令,则称该块指令为一个上下文(例如:events、http、server和location)
If a block directive can have other directives inside braces, it is called a context (examples: events, http, server, and location).
在配置文件中的所有上下文(context)之外的指令被认为是在main上下文中。
Directives placed in the configuration file outside of any contexts are considered to be in the main context.
events和http指令在main上下文中,server在http上下文中,location在server上下文中。
The events and http directives reside in the main context, server in http, and location in server.
其余的在#后面的行是注释。
The rest of a line after the # sign is considered a comment.
- Nginx学习笔记——配置文件结构
- NGINX配置文件学习笔记
- Nginx学习笔记(二):配置文件
- nginx学习笔记7 nginx配置文件详解
- nginx 源码学习笔记(十三)——文件读写和配置文件读取
- nginx 源码学习笔记——文件读写和配置文件读取
- nginx 源码学习笔记(十三)——文件读写和配置文件读取
- nginx学习4——nginx的几个配置文件学习nginx.conf、fastcgi.conf
- nginx 学习笔记(6) nginx配置文件中的度量单位
- nginx学习笔记4 nginx的配置文件1 通用配置
- Nginx学习(12)—核心结构(1)
- Nginx学习(12)—核心结构(2)
- Nginx学习笔记(十二):核心结构体
- 【Nginx笔记】nginx配置文件详解
- nginx配置文件笔记
- 细说Nginx系列-- Nginx配置文件结构
- mybatis学习笔记——Xml配置文件
- nginx配置文件学习
- UESTC 95 Ants Run! 水题
- 码农小汪-struts2学习6-国际化
- android 自定义控件学习
- 构建之法心得
- ubuntu下软件安装和卸载
- Nginx学习笔记——配置文件结构
- HDU 3715 Go Deeper 2-SAT 二分答案
- 5-35 有理数均值 c 语言
- Spring Batch(3): 基本概念(批处理DSL)
- Xcode 中svn常见字母含义
- JZOJ3395. 【NOIP2013模拟】Freda的传呼机
- 基于单片机设计的俄罗斯方块----第一篇(总体规划)
- 1004 of greedy strategy
- JSON-Linking data