nikdoof.com

/posts/ 2014/deluge-web-interface-and-ngnix

Deluge Web Interface and Nginx

Jan 17, 2014

After a short, frustrating time, i’ve finally got the Deluge WebUI to proxy through Nginx without any errors. The revelation came when digging through the Deluge forums I found a little nugget of information which solved it all, a small header call X-Deluge-Base that when passed will prefix any media calls made in the page with that text. So instead of setting up weird aliases and fiddling around with Nginx’s options to get it to work I could just specify that and use a very basic server config.

upstream deluge  {
  server localhost:8112;
}

server {
  server_name  deluge.home;

  location / {
    proxy_pass  http://deluge;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
    proxy_redirect off;
    proxy_buffering off;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Deluge-Base   "/";
  }
}