As The last ship sailed towards the distant horizon I sat there watching on a rock My mind slowly drifting away Forming into my... Dreamtale
Reverse proxy of Nginx and Node.js express site
2018-05-26 / 1 min read

## other.conf
server {
    listen 443;

    server_name tumblr.suntabu.com;

    ssl                  on;
    ssl_certificate      /home/upload/nodejs/keys/server.crt;
    ssl_certificate_key  /home/upload/nodejs/keys/server.key;

    ssl_session_timeout  5m;
<!-- more -->



    location / {
        proxy_pass  https://www.tumblr.com;
    }
}

server {
        listen 80;
        server_name tumblr.suntabu.com;

        rewrite ^(.*)$  https://$host$1 permanent;
}

and my blog conf:

server {
       listen 80;

       server_name www.suntabu.com;

      rewrite ^(.*)$  https://$host$1 permanent;
}


server {
    listen 443;

    server_name www.suntabu.com;

    ssl                  on;
    ssl_certificate      /home/upload/nodejs/keys/server.crt;
    ssl_certificate_key  /home/upload/nodejs/keys/server.key;

    ssl_session_timeout  5m;


    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_redirect off;  
        proxy_set_header X-Real-IP $remote_addr;  
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  
        proxy_set_header Host $http_host;  
        proxy_set_header X-NginX-Proxy true;  
    }
}