Page 5 of 5

Re: Howto: Proxying deluge web client to Apache via mod_prox

Posted: Thu Feb 24, 2011 9:31 pm
by giblet
WebUi works on http://www.mydomain.com/deluge but when I try to add torrent the WebUI stay on Torrent Upload.

When I try the same thing on http://www.mydomain.com:8112 it's work correctly.

I have try with "deluge-web -b /deluge" it do the same problem.
This seems to be a bug, I just ran into it too. The webui plugin does not honour the -b option and so tries to upload torrents to /upload, when (in my setup) it should be /deluge/upload. I had to hack the source code to insert the /deluge/ prefix to fix this, but this did indeed fix it.

As another note, I also had to manually edit the source to prevent the webui from listening on all interfaces, as once proxied, I only wanted it to listen on localhost. This is not supported either and I had to hard code it to make it work for now.

Re: Howto: Proxying deluge web client to Apache via mod_prox

Posted: Wed Sep 21, 2011 2:20 pm
by arbrandes
Just a quick update to confirm that on Deluge 1.3.3 (as found in the Ubuntu PPA), if you're on an actual domain and don't want to change the base path all you need to do is create this virtual host:

Code: Select all

<VirtualHost *:80>
        ServerName deluge.your.domain
        ServerAlias deluge.local.network deluge
        ProxyRequests off
        ProxyPass / http://127.0.0.1:8112/
        ProxyPassReverse / http://127.0.0.1:8112/
        ProxyPassReverseCookieDomain 127.0.0.1 %{HTTP:Host}
        <Proxy *>
          Order deny,allow
          Allow from all
        </Proxy>
</VirtualHost>
Note the %{HTTP:Host} on ProxyPassReverseCookieDomain: this makes it so the cookies work on server aliases too (for instance, if you're accessing the page on a local network domain).

This was tested on Ubuntu 10.04.

Re: Howto: Proxying deluge web client to Apache via mod_prox

Posted: Fri Jan 04, 2013 7:53 pm
by iwill
I'm currently attempting to set this up under the nginx web server but I am presented with a "No Such Resource, No such child resource" page at my configured deluge url. I'm currently using this same setup and server to successfully proxy Subsonic, Sickbeard, and SabNZBD+ but I have no idea why Deluge is failing...

I've attempted to use the nginx directives that are equivalent to the Apache ones that are discussed above. If anyone has a clue after taking a look at the configuration below, I'd be very grateful!

In deluge's web.conf, I have set:

Code: Select all

"base": "/deluge/"
And my relevant nginx configuration is the following

Code: Select all

        location /deluge {
                proxy_pass http://127.0.0.1:8086;
                proxy_set_header  X-Deluge-Base "/deluge";
                proxy_cookie_domain 127.0.0.1 localhost;
                proxy_cookie_path / /deluge;

                auth_basic "Restricted";
                auth_basic_user_file /etc/nginx/conf.d/params/password;

                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;
        }

Re: Howto: Proxying deluge web client to Apache via mod_prox

Posted: Fri Apr 12, 2013 9:37 pm
by Gurney
Lexuor76 wrote:Hello,
I'm french. I have installed deluged and deluge-web on my ubuntu server. I want to proxying Webui with apache.
I have configured apache with this solution

Code: Select all

ProxyRequests Off

<Location /deluge>
   RequestHeader append X-Deluge-Base "/deluge/"
</Location>

<Proxy *>
   Order deny,allow
   Allow from all
</Proxy>

ProxyPass /deluge http://127.0.0.1:8112
ProxyPassReverse /deluge http://127.0.0.1:8112
ProxyPassReverseCookieDomain 127.0.0.1 localhost
ProxyPassReverseCookiePath / /deluge/
WebUi works on http://www.mydomain.com/deluge but when I try to add torrent the WebUI stay on Torrent Upload.

When I try the same thing on http://www.mydomain.com:8112 it's work correctly.

I have try with "deluge-web -b /deluge" it do the same problem.

Can you help me?
I have exactly the same problem (and same config), with Deluge 1.3.5. I also noticed that for some reason, with the reverse_proxy I cannot access the tab "render/tab_status.html".

Re: Howto: Proxying deluge web client to Apache via mod_prox

Posted: Fri Jun 14, 2013 10:32 pm
by hypnotoad
I ended up figuring out my configuration using the rewrite (so everything is HTTPS). I have the following in my default-ssl in apache2 config & web.conf:
/var/lib/deluge/.config/deluge/web.conf

Code: Select all


  "file": 1,
  "format": 1
}{
  "port": 8112,
  "enabled_plugins": [],
  "pwd_sha1": "omit",
  "theme": "gray",
  "show_sidebar": true,
  "sidebar_show_zero": false,
  "pkey": "ssl/daemon.pkey",
  "https": false,
  "sessions": {
    "omit": {
      "login": "admin",
      "expires": 1371248748.0,
      "level": 10
    }
  },
  "base": "/deluge",
  "pwd_salt": "omit",
  "show_session_speed": true,
  "first_login": false,
  "cert": "ssl/daemon.cert",
  "session_timeout": 3600,
  "default_daemon": "",
  "sidebar_multiple_filters": true
}
/etc/apache2/sites-available/default-ssl

Code: Select all

<Location /deluge/>
ProxyPass http://127.0.0.1:8112/
ProxyPassReverse http://127.0.0.1:8112/
ProxyPassReverseCookieDomain 127.0.0.1 %{HTTP:Host}
ProxyPassReverseCookiePath / /deluge/
RequestHeader append X-Deluge-Base "/deluge/"
</Location>

Re: Howto: Proxying deluge web client to Apache via mod_prox

Posted: Tue Mar 24, 2015 11:57 pm
by hayburner
nginx users, I've posted in another thread something that I found to be extremely important for this particular proxy_pass: SLASHES. See here: http://forum.deluge-torrent.org/viewtop ... 21#p208733
iwill wrote:I'm currently attempting to set this up under the nginx web server but I am presented with a "No Such Resource, No such child resource" page at my configured deluge url. I'm currently using this same setup and server to successfully proxy Subsonic, Sickbeard, and SabNZBD+ but I have no idea why Deluge is failing...

I've attempted to use the nginx directives that are equivalent to the Apache ones that are discussed above. If anyone has a clue after taking a look at the configuration below, I'd be very grateful!

In deluge's web.conf, I have set:

Code: Select all

"base": "/deluge/"
And my relevant nginx configuration is the following

Code: Select all

        location /deluge {
                proxy_pass http://127.0.0.1:8086;
                proxy_set_header  X-Deluge-Base "/deluge";
                proxy_cookie_domain 127.0.0.1 localhost;
                proxy_cookie_path / /deluge;

                auth_basic "Restricted";
                auth_basic_user_file /etc/nginx/conf.d/params/password;

                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;
        }
Basically, for iwill here, I've found that a trailing slash in proxy_pass and X-Deluge-Base is required. Both of those in his nginx config do not have trailing slashes. If this is set, he also does not need

Code: Select all

"base": "/deluge/"
just use

Code: Select all

"base": "/"