Howto: Proxying deluge web client to Apache via mod_proxy

General support for problems installing or using Deluge
maxslug
New User
New User
Posts: 3
Joined: Tue Mar 24, 2009 3:03 am

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

Post by maxslug »

I took this up two notches...

1. Require https
2. Add a password file (using the same one as my mythtv front-end)

This worked for Deluge 1.1x :

Code: Select all

# Reverse-proxy deluge server into main server space

ProxyRequests off
ProxyPass /deluge/ http://127.0.0.1:8112/

<Location /deluge/>
   ProxyPassReverse http://127.0.0.1:8112/deluge/
   Order allow,deny
   Allow from all
   SSLCipherSuite HIGH:MEDIUM
   SSLRequireSSL
   AuthName "welcome to my super high security site dude"
   AuthType Basic
   AuthUserFile /etc/httpd/conf.d/htpasswd
   Require valid-user
</Location>
For mythdora (fedora, centos, etc) I put the above in /etc/httpd.conf/deluge.conf and did a "service httpd restart" and was in business....


For 1.3x on mythbuntu 10.10 (maverick) I use the following code instead that adds the Proxy*Cookie directives and uses the new digest-type Apache 2.2 authentication in MythTV 0.23, 0.24 and on.

Code: Select all

# Reverse-proxy deluge server into main server space

ProxyRequests off
ProxyPass /deluge/ http://127.0.0.1:8112/

<Location /deluge/>
   ProxyPassReverse http://127.0.0.1:8112/deluge/
   ProxyPassReverseCookieDomain 127.0.0.1 localhost
   ProxyPassReverseCookiePath / /deluge/
   Order allow,deny
   Allow from all
   SSLCipherSuite HIGH:MEDIUM
   SSLRequireSSL
   AuthType           Digest
   AuthName           "MythTV"
   AuthUserFile       /etc/mythtv/mythweb-digest
   Require valid-user
</Location>

You will need to run the following to install mod_proxy on Ubuntu

Code: Select all

$sudo a2enmod proxy
$sudo a2enmod proxy_http
Then you will need to add "-b /deluge" to wherever you run deluge-web. I used the directions here http://dev.deluge-torrent.org/wiki/User ... ipt/Ubuntu,
so I changed the /etc/init.d/deluge-daemon file as such :

Code: Select all

DAEMON2_ARGS="-L warning -l /var/log/deluge/deluge-web.log -b /deluge"
If you have the SSL lines, you will need to setup mod_ssl for ubuntu. See http://www.tc.umn.edu/~brams006/selfsign_ubuntu.html for directions.

-m
Last edited by maxslug on Tue Jan 11, 2011 10:58 pm, edited 1 time in total.
chris86wm
Member
Member
Posts: 12
Joined: Mon Feb 01, 2010 4:56 am

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

Post by chris86wm »

I get a blank page when I try to go to /deluge/ using the following code. Does anybody have some ideas?

Code: Select all

    ProxyRequests off
    ProxyHTMLExtended on
    ProxyPass /deluge/ http://127.0.0.1:8112/
    ProxyHTMLURLMap http://127.0.0.1:8112 /deluge

    <Location /deluge/>
            ProxyPassReverse /
            SetOutputFilter proxy-html
            ProxyHTMLURLMap / /deluge/ ec
            ProxyHTMLURLMap /deluge /deluge ec
            ProxyHTMLURLMap ([^*])(\/[^*].*) $1/deluge$2 hRxL
            RequestHeader unset Accept-Encoding
            Order allow,deny
            Allow from all
    </Location>
Tenkian
New User
New User
Posts: 9
Joined: Wed Mar 11, 2009 11:08 am

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

Post by Tenkian »

Proxying does not work in version 1.2. It has been raised as a ticket and it looks like it will be fixed in 1.3
chris86wm
Member
Member
Posts: 12
Joined: Mon Feb 01, 2010 4:56 am

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

Post by chris86wm »

Thank you for the help
damoxc
Top Bloke
Top Bloke
Posts: 117
Joined: Sat Jul 19, 2008 7:26 pm
Location: Hampshire, UK
Contact:

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

Post by damoxc »

It is fixed in git now if you wish to test it there is a guide on getting the source at http://dev.deluge-torrent.org/wiki/GitRepo
non7top

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

Post by non7top »

And how is it supposed to be used in latest git? I've tried 'deluge -u web /deluge' but it takes no effect
damoxc
Top Bloke
Top Bloke
Posts: 117
Joined: Sat Jul 19, 2008 7:26 pm
Location: Hampshire, UK
Contact:

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

Post by damoxc »

There are now 3 ways to get this to work in the latest git master:
  • use --base/-b on deluge-web
  • set base in the web.conf file
  • set x-deluge-base as a header when configuring the proxy
Here is the config I was using:

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/
k-rog
Member
Member
Posts: 18
Joined: Sat Apr 17, 2010 2:51 pm

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

Post by k-rog »

damoxc wrote:There are now 3 ways to get this to work in the latest git master:
  • use --base/-b on deluge-web
  • set base in the web.conf file
  • set x-deluge-base as a header when configuring the proxy
Here is the config I was using:

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/
Is this example still up2date with the 1.2.3 version? I have set it up like the example. But i am getting a blank page with only some javascript and css includes in the source. IE8 give me the following message:

Code: Select all

Message: 'Deluge' is not defined
Regel: 23
Teken: 13
Code: 0
URI: http://mydomain.com/deluge/
Just saw there was allready this guestion open in a different topic. Here: http://forum.deluge-torrent.org/viewtop ... .3#p107265.
k-rog
Member
Member
Posts: 18
Joined: Sat Apr 17, 2010 2:51 pm

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

Post by k-rog »

After searching arround i found this bug report. Can i conclude with this that the reverse proxying is solved with updating to version 1.3?

http://dev.deluge-torrent.org/ticket/1233#comment:1
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

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

Post by johnnyg »

k-rog wrote:After searching arround i found this bug report. Can i conclude with this that the reverse proxying is solved with updating to version 1.3?

http://dev.deluge-torrent.org/ticket/1233#comment:1
You didn't need to search around much, just look a few posts up :P
(yes it's fixed in git which will be version 1.3)
Post Reply