龙空技术网

「HTTP系列」 深入理解HTTPS之——Nginx TLS1.3 配置优化

极客24h 203

前言:

现在小伙伴们对“深入理解http”可能比较珍视,兄弟们都想要剖析一些“深入理解http”的相关文章。那么小编在网络上搜集了一些关于“深入理解http””的相关知识,希望各位老铁们能喜欢,兄弟们一起来学习一下吧!

SSL -Nginx优化配置

ssl_protocols TLSv1.2 TLSv1.3;# Requires nginx >= 1.13.0 else use TLSv1.2ssl_prefer_server_ciphers on; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # openssl dhparam -out /etc/nginx/dhparam.pem 4096ssl_ciphers TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:EECDH+CHACHA20:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256; ssl_ecdh_curve X25519:P-256;ssl_session_timeout 10m;ssl_session_cache shared:SSL:10m;ssl_session_tickets off; # Requires nginx >= 1.5.9ssl_stapling on; # Requires nginx >= 1.3.7 ## open OCSPssl_stapling_verify on; # Requires nginx => 1.3.7resolver 233.6.6.6 233.5.5.5 valid=300s;resolver_timeout 5s; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";add_header X-Frame-Options DENY;add_header X-Content-Type-Options nosniff;add_header X-XSS-Protection "1; mode=block";

标签: #深入理解http