nginx服务器下使用https,该怎么配置nodejs?

自己在startssl上申请了证书,打算让网站支持https

用的是nginx代理,然后转发到nodejs

现在nginx配置成https了也显示成功了

想问nodejs用不用改成https 还是用以前的http就行?

我试着改成https不成功:提示安全证书有问题Your connection is not private

nginx相关代码:

   upstream nodejs {
                server 127.0.0.1:8090;
        }

        server {
                root /usr/share/nginx/myblog/public;
                #tryfiles $uri $uri/index.html @express;
                listen 443 ssl;
                ssl on;
                server_name tempwrite.msocca.com sxgift.cn my.sxgift.cn 10000h.top;

                ssl_certificate  /etc/nginx/conf.d/ssl/1_www.10000h.top_bundle.crt;
                ssl_certificate_key   /etc/nginx/conf.d/ssl/ssl_ca.key;

                ssl_session_timeout 5m;


                location / {
                  proxy_pass http://nodejs;
                }
                location ~.*\.(ico|jpe?g|png)$ {
                  expires 2d;
                }

        }
查看回复