Nginx软件之所以强大,是因为具有众多的功能模块,下面列出了企业常用的重要模块。
- Nginx核心功能模块(Core functionality)
Nginx核心功能模块负责Nginx的全局应用,主要对应主配置文件的Main区块和Events区块区域,这里有很多Nginx必须的全局参数配置。
有关核心功能模块的详细信息请参考官方网址:http://nginx.org/en/docs/ngx_core_module.html
- 标准的http功能模块集合
这些标准的http功能模块,虽然不是Nginx软件所必需的,但都是很常用的,因此绝大部分默认情况下都会自动安装到Nginx软件中(见下表)。
企业场景常用的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连接,如https |
ngx_http_stub_status_module | 记录Nginx基本访问状态信息等的模块 |