nginx 配置多SSL证书

  • nginx 必须大于1.9.0
    添加upstream设置
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    # SSL rainingway
    upstream test_one {
    server 127.0.0.1:2048;
    }
    server {
    listen 443;
    server_name rainingway.com;#网站域名
    ssl on;
    ssl_certificate /root/rainingway.com/rainingway.pem;
    ssl_certificate_key /root/rainingway.com/rainingway.key;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;#按照这个套件配置
    ssl_prefer_server_ciphers on;
    root /root/rainingway;#修改根目录(如果修改后重启显示403,则要开启读写权限)
    include /etc/nginx/default.d/*.conf;
    index index.html index.htm;
    location /{
    index index.html index.htm;
    }
    error_page 404 /404.html;
    location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    }
    }
本文总阅读量