I have this example.com
domain.
I install WordPress using Nginx, and it's all ok in example.com
.
I install Deluge, Deluge WebUI, default port is 8112, and example.com:8112
is all ok again also for Deluge Web UI.
I didn't install anything for Python in Nginx for Deluge, Deluge has it's own web server (I think).
However I want to be able to use Deluge WebUI from subdomain.example.com
, instead of (example.com:8112
or subdomain.example.com:8112
).
I don't care much if the other solution will keep working as well, I would prefear not to, but what is really important for me is to deliver a working Deluge Web UI at subdomain.example.com
By default, even with Nginx stopped, both subdomain.example.com:8112
and example.com:8112
work and redirect me to Deluge WebUI properly.
However I'm unable to proxy Nginx with default ports (80/443) to Deluge listening in 8112.
I tried many solutions with Nginx, I even managed to redirect to the Deluge Web page, but all I see is a blank page (though inspecting it with dev tool I see that there is the deluge code behind it, and the url inside, like /somewhere/something.css are working as well).
It is not even a problem of permission, because (after making a backup copy to restore them properly) I even tried to give 777 with -R in the deluge web directory.
The blank page as before actually has some javascript errors, it's likely that that is blocking, but they work on the port 8112, so maybe is some javascript not redirecting to the correct port?
That's one of the Nginx configuration I tried. I tried many, I can't list all the possibilities I tried.
server {
listen 80;
server_name subdomain.example.com;
## redirect http to https ##
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name subdomain.example.com;
root /usr/share/pyshared/deluge/ui/web;
index index.html;
location / {
proxy_pass httTHIS IS INSIDE A CODE WTH ps://localhost:8112;
proxy_redirect 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_pass_header Set-Cookie;
proxy_pass_header P3P;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~* .(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
access_log /var/log/nginx/nginx.example.com.access.log;
error_log /var/log/nginx/nginx.example.com.error.log;
}
bold is where I edited server specific informations
Nginx, Deluge, change port to default and use subdomain instead
nginx
Best Answer
Seems i have been able to make it works, following these steps :
Install packages :
deluge
deluge-webui
deluged
Then start
deluge-web
:# deluge-web
or# deluge-web --fork
to have it running in backgroundThen setup
NGinx
like this :For https (port 443), first i've setup
deluge
to use https :server.crt
andserver.key
in$HOME/.config/deluge/ssl
Open
$HOME/.config/web.conf
and setup like this :Then restart
deluge-web
Finally setup
NGinx
:Note that it seems you cannot use
deluge
with bothhttp
andhttps
: you have to choose one or another.