1

I've got one Raspberry Pi 2 Model B running Deluge and Deluge Web UI 24/7. I set up a No-IP free host so I can access the Rasperry Pi to download some data I've stored in a 3TB disk.

I am using Apache2 as the webserver but I am looking forward to change to a Go application I am creating myself.

The WebUI Deluge listening port is 9090.

I wanted to access Deluge WebUI without having to type :9090 in the end of the hostname (via /del would be ideal).

I read multiple questions on SO where the Reverse Proxies were mentioned. I quickly checked the official documentation.

The changes I've made to my configuration files are the following:

/etc/apache2/sites-enabled/000-default.conf

ProxyPass /del http://hostname:9090/
ProxyPassReverse /del http://hostname:9090/

I also tried rewrite in 000-default (but in different times)

RewriteEngine on
RewriteCond %{REQUEST_URI} /del [NC]
RewriteRule ^(.*)$ http://hostname:9090 [P]

Restarted Apache and the result is a blank page whenever I visit http://hostname/del (via browser)

1 Answer 1

0

Forwarding web traffic to a proxy application

Using Apache ProxyPass

Reverse Proxy

ProxyPass "/del" "http://127.0.0.1/"
ProxyPassReverse "/del" "http://127.0.0.1/"
Forward Proxy

ProxyRequests On
ProxyVia On

<Proxy "*">
  Require host localhost
</Proxy>
  • Test your config for error : apachectl -t
  • Restart apache web server : service apache2 restart

Forwarding web traffic to a proxy application

Using iptables

iptables -t nat -A PREROUTING -p -tcp -d 127.0.0.1 \
--dport http -j DNAT --to-destination 127.0.0.1:9090

The above forward all traffic coming to 127.0.0.1 port 80 to 127.0.0.1 port 9090.

1
  • Changed the 000-default.conf file and I'm now got a 403 Forbidden page from Apache. Quickly added Require all granted to Proxy block and now it's still a blank page, with the Deluge Web UI title and when checking the source code it's exactly the same as if I was accessing through the port 9090, although, Chrome doesn't display anything. Sep 2, 2017 at 22:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .