nginx模块记录

1. ngx_http_ssl_module

让Nginx可以支持HTTPS的模块

(1)ssl on | off; 

  #是否开启ssl功能

(2)ssl_certificate file;

  #当前虚拟主机使用的PEM格式的证书文件

(3)ssl_certificate_key file;

  #当前虚拟主机使用的证书中与公钥配对的私钥文件

(4)ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2];

  #ssl协议的版本,SSLv2不安全,建议使用TLS,默认使用的是TLS

(5)ssl_session_timeout time;

  #ssl会话超时时长,指ssl会话中缓存条目的有效时长,默认为5m

(6)ssl_prefer_server_ciphers on | off;

  #倾向于使用服务器端的加密算法,默认是关闭的

(7)ssl_session_cache off | none | [builtin[:size]] [shared:name:size];

  #指明ssl会话的缓存机制,默认是关闭的

2. ngx_devel_kit

当作依赖使用

以下第三方模块等依赖使用NDK。

  • ngx_http_lua_module
  • ngx_http_set_misc_module
  • ngx_http_encrypted_session_module
  • ngx_http_form_input_module
  • ngx_http_iconv_module
  • ngx_http_array_var_module

 3. echo-nginx-module

  使nginx支持echo输出

  set $a 21;

  echo $a;

 4. form-input-nginx-module

  用于接收post请求数据解析为nginx变量

  set_form_input $data data

  echo $data  #变量$data为post请求的数据

 5ngx_log_if 

  日志过滤

  server {

    location / {

      access_log_bypass_if($status = 404); 不记录404状态的所有日志信息

      access_log_bypass_if( $uri ~* 'images'); #不记录uri中所有images目录下文件的日志信息

      access_log_bypass_if ($uri = '/index.html'); #不记录uri为/index.html的日志信息

      access_log_bypass_if ($host ~* 'tonv.cc'); #不记录host为tonv.cc的所有日志信息

    }

  }

6. lua-nginx-module

  可以支持lua开发

  

  

原文地址:https://www.cnblogs.com/JahanGu/p/9429588.html