强制启用 tlsv1 nginx

强制启用 tlsv1 nginx

为了与一些合作伙伴保持向后兼容,我们必须在某些网站上运行 TLSv1。问题是,在最新升级后,当前设置不再接受 TLSv1,即使它是在 Vhost 文件中设置的。

我正在运行 Nginx 1.4.6 和 OpenSSL 1.0.1f,这是我们的安装文件

server {
        listen  443 ssl;
        listen [::]:443 ssl;
        server_name www.example.com;
        root        /path/to/websites/www.example.com/public;
        index       /index.php;
        access_log      off;
        error_log      /path/to/logs/logs/error.log;

        rewrite ^/(.*)/$ /$1 break;

        ssl on;
        ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;
        ssl_certificate_key /etc/nginx/ssl/myserver.key;


        ssl_session_timeout 5m;

        ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP';
    ssl_prefer_server_ciphers on;

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

        ssl_stapling on;
        ssl_stapling_verify on;

        location / {
                try_files $uri $uri/ /index.php$is_args$args;
        }

        include php.conf;
}

真的不明白发生了什么,但最重要的是我们需要启用 TLSv1 TLSv1.1 和 TLSv1.2。有人能帮忙吗?

先谢谢了

相关内容