黑马程序员技术交流社区

标题: 【上海校区】Nginx模块-ngx_http_ssl_module [打印本页]

作者: 梦缠绕的时候    时间: 2020-5-7 09:12
标题: 【上海校区】Nginx模块-ngx_http_ssl_module
Nginx模块-ngx_http_ssl_module
ngx_http_ssl_module简介#
为https提供支持

ngx_http_ssl_module参数解释#
ssl on|off;
ssl_certificate file; #当前虚拟主机使用PEM格式的证书文件
ssl_certificate_key file; #当前虚拟主机上与其证书匹配的私钥文件
ssl_protocols [SSLv2] [SSLv3] [TLSv1] [TLSv1.1] [TLSv1.2]; #支持ssl协议版本,默认为后三个
ssl_session_cache off|none| [builtin[:size]] | [shared:name:size];
builtin[:size]:使用OpenSSL内建的缓存,此缓存为每个worker进程私有
shared:name:size:在各worker之间使用一个共享的缓存
ssl_session_timeout time;客户端一侧的连接可以复用ssl_session_cache中缓存的ssl参数的有效时长
配置示例:#
Copy
server {
      listen 443 ssl;
      servername www.xxx.com;
      root /opt/nginx/html;
      ssl on;
      ssl_certificate /opt/nginx/ssl/nginx.crt;
      ssl_certificate_key /opt/nginx/ssl/nginx.key;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_session_cache shared:sslcache:20m;
以上内容转载自网络
更多讯息欢迎添加小优:DKA-2018








欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2