ini NGINX的SSL配置代码段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini NGINX的SSL配置代码段相关的知识,希望对你有一定的参考价值。

➜  ~ cat /etc/nginx/snippets/ssl-params.conf

# from https://cipherli.st/
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
# Disable preloading HSTS for now.  You can use the commented out header line that includes
# the "preload" directive if you understand the implications.
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";

# Note: disabled subdomains for HSTS b/c Chrome no likey non-SSL subs
add_header Strict-Transport-Security "max-age=63072000";

add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

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

以上是关于ini NGINX的SSL配置代码段的主要内容,如果未能解决你的问题,请参考以下文章

ini 适用于A +级的Nginx SSL配置

ini 使用Let的加密证书为NGINX配置SSL

ini 使用Let的加密证书为NGINX配置SSL

ini 使用puma [ssl和non-ssl版本]为rails 4应用程序配置Nginx

ini 使用强制SSL和www到非www重定向的ProcessWire的Nginx站点配置

ini Nginx的SSL设置