网站申请HTTPS 访问

#生成证书和key


openssl req -x509 -nodes -days 36500 -newkey rsa:2048 -keyout /opt/nginx/pdk.key -out /opt/nginx/pdk.crt


#修改配置文件 nginx.conf

    server {
    listen       443;
    ssl on;
    server_name  www.ccddxlpdk.cn;
    ssl_certificate      /opt/nginx/pdk2.crt;
    ssl_certificate_key  /opt/nginx/pdk2.key;

    location / {
        root   /opt/app/nginx/html;
        index  index.html index.htm;
    }
}


https://12.14.111.141/icon.png
https://12.14.111.141/shareicon.png
原文地址:https://www.cnblogs.com/liuyoushui/p/6605624.html