nginx配置https使其达到A+水平

星期六, 2016-05-21 | Author: Lee | linux | 426 views

前面有一篇文章配置了启用https的安全连接基于LetsEncrypt SSL的nginx配置

在 SSL的安全检测中才获得了B,想达到A+,也很轻松,加下配置文件即可,测试地址:https://www.ssllabs.com/ssltest/index.html

配置如下(nginx.conf):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 server
  {
    listen     192.168.1.1:443 ssl;
    listen     192.168.1.1:80;
    server_name www.iatodo.com iatodo.com;
 
    add_header               Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
    ssl_certificate          /etc/letsencrypt/live/iatodo.com/fullchain.pem;
    ssl_certificate_key      /etc/letsencrypt/live/iatodo.com/privkey.pem;
 
    ssl_ciphers                EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
    ssl_prefer_server_ciphers  on;
 
    ssl_protocols              TLSv1 TLSv1.1 TLSv1.2;
    ssl_session_cache          shared:SSL:50m;
    ssl_session_timeout        1d;
    ssl_session_tickets        on;
 
  ......

最后放图 画圈的部分是 Strict-Transport-Security的部分,默认开启https的访问
iatodossl

Tags: , ,

文章作者: Lee

本文地址: http://blog.i5a6.com/1575.html

除非注明,I5A6文章均为原创,转载请以链接形式标明本文地址

还没有评论呢。

留下评论

Rss

Search

文章分类

Meta