nginx ssl节点反向代理不启动

时间:2018-05-01 06:27:06

标签: node.js ubuntu ssl nginx

我正在尝试将ssl证书绑定到nginx,但它仍然无法启动我附加了我的配置文件,

server {
    listen 80;
    server_name appoye.com;
    return 301 https://appoye.com$request_uri;
}

server {
    listen 443 ssl;
    server_name appoye.com;
    root /home/rohit_jain/appoye-beta-old/dist;

    # SSL Certs
    ssl_certificate /etc/nginx/ssl/appoye.com/certificate.crt;
    ssl_certificate_key /etc/nginx/ssl/appoye.com/server.key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    charset utf-8;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;         
    }

    access_log off;
    error_log  /var/log/nginx/appoye.com-error.log error;
}

Nginx仍未传递我的nodejs revser代理和ssl证书

0 个答案:

没有答案