nginx 支持多个https
1:配置多个server
2:将http直接指向https
所有的域名都会自动转成https
===========
1:配置多个server:关键代码
listen 443 ssl;
ssl_certificate /mnt/application/nginx/www1/2141.pem;
ssl_certificate_key /mnt/application/nginx/www1/2141.key;
ssl_session_timeout 5m;
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
2:将http直接指向https:关键代码
server {
listen 80;
server_name www.web.com;
return 301 https://$server_name$request_uri;
}