Network setup
The idea is to use Apache and mod_proxy to redirect all communication on the web server to the deluge web client running on my file server. Deluge can either be on the same server or on a different server.
[*] IP; 10.0.0.3 - Internal file server with deluge web client,
[*] IP; 10.0.0.2 - Web server with Apache 2.2
The following apache modules are needed;
[*] mod_proxy
[*] mod_proxy_html
Configuration of Apache
The code below will proxy all request on http://example.org/deluge/ and http://example.org/torrent/ to http://10.0.0.3:8112/. Then when the HTML code are sent back and forth to the web browser, the HTML links will be rewritten to work on the deluge web client.
Code: Select all
ProxyRequests off
ProxyPass /deluge/ http://10.0.0.3:8112/
ProxyPass /torrent/ http://10.0.0.3:8112/torrent/
ProxyHTMLURLMap http://10.0.0.3:8112 /deluge
<Location /deluge/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /deluge/
ProxyHTMLURLMap /deluge /deluge
RequestHeader unset Accept-Encoding
</Location>
<Location /torrent/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /deluge/
RequestHeader unset Accept-Encoding
</Location>
http://www.askapache.com/htaccess/rever ... pache.html
Remember to secure your /deluge/ and /torrent/ locations via authentication or other means.