/posts/ 2014/deluge-web-interface-and-ngnix
Jan 17, 2014
Warning: This post was written 3991 days ago, and may contain incorrect information, outdated opinions, and incorrect language due to my age at the time. Opinions in this post are not representative of who I am as a person today.
After a short, frustrating time, i’ve finally got the Deluge (archive.org) WebUI to proxy through Nginx without any errors. The revelation came when digging through the Deluge forums I found a little nugget of information (archive.org) 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 "/";
}
}