首页 > 其他 > 详细

nginx深入剖析

时间:2018-08-24 10:32:23      阅读:131      评论:0      收藏:0      [点我收藏+]

nginx软件功能模块说明

Nginx软件之所以强大,是因为它具有众多的功能模块,下面列出了企业常用的重要模块。(1) Nginx核心功能模块(Core functionality)
nginx核心功能模块负责Nginx的全局应用,主要对应主配置文件的Main区块和Events区块区域,这里有很多Nginx必须的全局参数配置。有关核心功能模块的详细信息,请看官网,地址为http://nginx.org/en/docs/ngx_core_module.html。
(2)标准的http功能模块集合


这些标准的http功能模块,虽然不是nginx软件所必需的,但都是很常用的,因此绝大部分默认情况都会自动安装到 Nginx软件中(见下表),不建议擅自改动,保留软件的默认配置就好,除非你明确知道你在做什么,有什么额外影响。
在生产环境中,配置、调整及优化 Nginx软件,主要就是根据这些模块的功能修改相应的参数来实现的。通过官方地址http://nginx.org/en/docs/可以查看到上述及更多模块的详细使用帮助。

常用的Nginx http功能模块汇总

Nginx http 功能模块	               模块说明

ngx_http_core_module	           包括一些核心的http参数配置,对应nginx的配置为HTTP区块部分
ngx_http_access_module	        访问控制模块,用来控制网站用户对Nginx的访问
ngx_http_gzip_module	           压缩模块,对Nginx返回的数据压缩,属于性能优化模块
ngx_http_fastcgi_module	      FastCGI模块,和动态应用相关的模块,例如PHP
ngx_http_proxy_module	      proxy代理模块
ngx_http_upstream_module     负载均衡模块,可以实现网站的负载均衡功能及节点的健康检查
ngx_http_rewrite_module	      URL地址重写模块
ngx_http_limit_conn_module	          限制用户并发连接数及请求数模块
ngx_http_limit_req_module	           根据定义的key限制Nginx请求过程的速率
ngx_http_log_module	             访问日志模块,以指定的格式记录Nginx客户访问日志等信息
ngx_http_auth_basic_module	   Web认证模块,设置web用户通过账号、密码访问Nginx
ngx_http_ssl_module	             ssl模块,用于加密的http连接,如htts
ngx_http_stub_status_module	   记录Nginx基本访问状态信息等的模块        

nginx的目录结构说明

[root@nginx ~]# tree /application/nginx/
/application/nginx/
├── client_body_temp
├── conf
│   ├── fastcgi.conf
│   ├── fastcgi.conf.default
│   ├── fastcgi_params
│   ├── fastcgi_params.default
│   ├── koi-utf
│   ├── koi-win
│   ├── mime.types
│   ├── mime.types.default
│   ├── nginx.conf
│   ├── nginx.conf.default
│   ├── scgi_params
│   ├── scgi_params.default
│   ├── uwsgi_params
│   ├── uwsgi_params.default
│   └── win-utf
├── fastcgi_temp
├── html
│   ├── 50x.html
│   └── index.html
├── logs
│   ├── access.log
│   ├── error.log
│   └── nginx.pid
├── proxy_temp
├── sbin
│   └── nginx
├── scgi_temp
└── uwsgi_temp

9 directories, 21 files

nginx的主配置文件 nginx.conf

nginx的主配置文件

 

nginx深入剖析

原文:https://www.cnblogs.com/Mr-Ding/p/9527562.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!