热门标签 | HotTags
当前位置:  开发笔记 > 后端 > 正文

Nginx学习笔记——配置文件结构

:本篇文章主要介绍了Nginx学习笔记——配置文件结构,对于PHP教程有兴趣的同学可以参考一下。
以下内容翻译自Nginx官方文档,[原文地址]。


nginx由模块组成,这些模块由配置文件中的指令进行控制。

nginx consists of modules which are controlled by directives specified in the configuration file.

指令分为简单指令和块指令。

Directives are pided 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.

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了Nginx学习笔记——配置文件结构,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 推荐阅读
    author-avatar
    靖憐兵役_523
    这个家伙很懒,什么也没留下!
    PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
    Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有