SSL Labs:https://www.ssllabs.com/ssltest/

进去之后输入网址耐心等待就可以了。

下面是本站评分结果的截图:

2016-11-08_201433.png

评分A我已经满足了,虽然离满分还是有段距离的。

贴一下我的Nginx SSL段的配置:

    ssl on;
    ssl_certificate /etc/nginx/ssl/onebox.site.crt;
    ssl_certificate_key /etc/nginx/ssl/onebox.site.key;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;

    ssl_dhparam /etc/nginx/ssl/onebox.site.dhparam.pem;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
    ssl_prefer_server_ciphers on;

其中dhparam.pem可以用如下命令生成:

    openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

追求SSL Labs更高评分的话,建议看下火狐给出的SSL配置文件:

https://mozilla.github.io/server-side-tls/ssl-config-generator/

都给弄上想来A+是跑不掉的。

备注:

配置文件中加上下面一行,原来的AA+了。

add_header Strict-Transport-Security max-age=15768000;

另外说下目前我这个博客,用的是StartSSL的免费证书,之前听说StartSSL和沃通的证书要不妙了;但是免费的证书,目前可选择的还是不少的,例如Let's Encrypt,阿里云和腾讯云都有免费1年的证书(不知道是否可以续期)。