2

I'm running RP3 as Nodered and Deluge (torrent) server, by default I can access Nodered via http://host_ip:1880 and Deluge via http://host_ip:8112 but now I installed Nginx (I'm newbie with it) then configure Nginx as reverse proxy to by pass port and use https (if my word is right??)

I edited /etc/nginx/sites-available/default file so now I can access Nodered via https://host_ip (no port):

server {
  listen 443 ssl;
  ssl on;
  ssl_certificate /etc/nginx/ssl/nginx.crt;
  ssl_certificate_key /etc/nginx/ssl/nginx.key; 
  ssl_verify_depth 3;
  ssl_protocols TLSv1.1 TLSv1.2;
  ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256";

  location / {
    proxy_pass http://localhost:1880/;
    proxy_set_header X-Real-IP $remote_addr;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Now I like to do with Deluge too, my idea is setting Nginx to access Deluge via https://host_ip/torrent (or any path name) but I really don't know how to set it work. Can anyone help me or saying that it's impossible so I could stop thinking about it :) Thanks

Bach
  • 21
  • 3

1 Answers1

0

In my case I added these lines in Nginx config file

location /torrent {
proxy_pass http://localhost:8112/;
proxy_set_header X-Deluge-Base "/torrent/";
add_header X-Frame-Options SAMEORIGIN;

After restart nginx service you can access Deluge web UI via https://host_ip/torrent

Bach
  • 21
  • 3