jpillora / node-torrent-cloud

Torrent Cloud – A self-hosted Bittorrent client in the Cloud
185 stars 183 forks source link

correct proxy_pass for nginx #3

Closed saveyour closed 8 years ago

saveyour commented 9 years ago

it seems to work with the below settings: (some of them may be redundant/not applicable)

    location /api/ { 
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_set_header X-Real-IP       $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;
            proxy_pass_header Server;
            proxy_set_header Host $host;
            proxy_buffering off;
            proxy_pass http://nodetorrent:8080/api/;
    }

    location / {
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_pass_header Server;
        proxy_set_header Host $host;
        proxy_buffering off;
           proxy_pass http://nodetorrent:8080/;
}
jpillora commented 8 years ago

thanks