map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}server {
    server_name dns.arifdev.com;    location / {
        proxy_pass http://localhost:3000;
        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;        # Enables WS support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
}Local Server SSH command:
ssh -N -R localhost:3000:localhost:80 root@165.22.214.217
(add -v at the end for debugging)
Comments
Post a Comment