Page 3 of 5

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

Posted: Tue Mar 24, 2009 3:07 am
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

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

Posted: Tue Feb 02, 2010 3:07 am
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>

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

Posted: Wed Feb 03, 2010 4:38 pm
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

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

Posted: Thu Feb 04, 2010 2:47 am
by chris86wm
Thank you for the help

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

Posted: Mon Mar 15, 2010 2:04 pm
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

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

Posted: Sat Mar 20, 2010 10:24 am
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

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

Posted: Sat Mar 20, 2010 2:36 pm
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/

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

Posted: Mon Apr 26, 2010 9:27 am
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.

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

Posted: Sun May 02, 2010 2:48 pm
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

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

Posted: Sun May 02, 2010 3:34 pm
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)