nginx 配置https

 

 

    server {
        listen    80;
        server_name  192.166.208.88;
        return 301 https://$server_name$request_uri;
    }


    # HTTPS server
    #
    server {
        listen       443 ssl;
        server_name  192.166.208.88;

        ssl_certificate      D:/nginxzhengshu/server.crt;
        ssl_certificate_key  D:/nginxzhengshu/server.key;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;

        location / {
            root   D:/wwwroot;
            index  index.html index.htm;
        }
    }

 

posted @ 2021-11-20 23:01  富坚老贼  阅读(23)  评论(0编辑  收藏  举报