OpenSSL error - unable to get local issuer certificate

前端 未结 2 1520
-上瘾入骨i
-上瘾入骨i 2021-02-20 05:58

I have a simple chain setup and can successfully verify in this case:

$ openssl version
OpenSSL 1.0.2m  2 Nov 2017
$ openssl verify -CAfile chain.pem cert.pem
ce         


        
2条回答
  •  甜味超标
    2021-02-20 06:48

    https://letsencrypt.org/ is really easy to use and free. Also, run node without SSL on a local HTTP port and use NGINX as a HTTPS proxy.

    sudo apt-get install certbot nginx

    server {
        listen 80 default_server;
        listen [::]:80 default_server;
        server_name _;
        return 301 https://$host$request_uri;
    }
    
    server {
        listen 443 ssl default_server;
        listen [::]:443 ssl default_server;
    
        ssl on;
        ssl_certificate /etc/letsencrypt/live/host.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/host.com/privkey.pem;
    
        access_log /var/log/nginx/host.access.log;
        error_log  /var/log/nginx/host.error.log;
    
        server_name _;
    
        gzip on;
        gzip_proxied any;
        gzip_types text/css text/javascript text/xml text/plain application/javascript application/x-javascript application/json;
    
        location / {
            include             /etc/nginx/proxy_params;
            proxy_pass          http://localhost:8080;
            proxy_read_timeout  90s;
            proxy_redirect      http://localhost:8080 https://www.host.com;
        }
    }
    

提交回复
热议问题