zoukankan      html  css  js  c++  java
  • SSL虚拟主机

    1.生成公钥与私钥

    [root@proxy ~]# cd /usr/local/nginx/conf
    [root@proxy ~]# openssl genrsa > cert.key                            //生成私钥
    [root@proxy ~]# openssl req -new -x509 -key cert.key > cert.pem      //生成证书

    2.修改配置文件

    [root@proxy ~]# vim  /usr/local/nginx/conf/nginx.conf
    … …    
    server {
            listen       443 ssl;
            server_name            www.c.com;
            ssl_certificate      cert.pem;         #这里是证书文件
            ssl_certificate_key  cert.key;         #这里是私钥文件
            ssl_session_cache    shared:SSL:1m;
            ssl_session_timeout  5m;
            ssl_ciphers  HIGH:!aNULL:!MD5;
            ssl_prefer_server_ciphers  on;
            location / {
                root   html;
                index  index.html index.htm;
            }
        }

    3.重启nginx服务

  • 相关阅读:
    软件对标分析
    alpha内测版发布
    第一阶段项目评审
    第一阶段意见汇总
    冲刺(二十)
    冲刺(十九)
    冲刺(十八)
    冲刺(十七)
    冲刺(十六)
    冲刺(十五)
  • 原文地址:https://www.cnblogs.com/ray-mmss/p/10147432.html
Copyright © 2011-2022 走看看