Cloudflare - Unable to access Deluge (and Plex)

deluge
cloudflare
plex

#1

First of all, thanks for the awesome script. It’s my first time setting up a dedicated server and using Ubuntu. It is fun to learn something new.

Anyway, my initial Quickbox setup works just fine.

And then I bought a domain and installed SSL certificate by following this guide. All is fine.

But then after finished my Cloudflare setup, I can’t access Deluge and Plex anymore. I thinks it’s because of the unsupported ports : https://support.cloudflare.com/hc/en-us/articles/200169156-Which-ports-will-CloudFlare-work-with-

I guess still can access Plex from their own website? Or just follow this guide to configure plex reverse proxy

But from what I’ve read, I can’t do reverse proxy for Deluge if I have more than one users (multiple ports)?

So, what can I do to solve this problem?

Cloudflare said I should create a subdomain for unsupported ports. So do I need to create new VirtualHost for each users, and use ProxyPassReverse like this : http://stackoverflow.com/questions/8441881/subdomain-proxy-pass-all-pointing-to-single-server

And this : https://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass ?


#2

Okay I managed to gather some courage and try something.

I create user "test"
And new .conf file with content :

<VirtualHost *:80>
  ServerName test.domain.tld
  ProxyRequests Off
  <Proxy *>
    Require all granted --> to avoid username & password popup
    Order deny,allow
    Allow from all
  </Proxy>
  ProxyPass / http://{server IP}:{test user port}/
  ProxyPassReverse / http://{server IP}:{test user port}/
</VirtualHost>

Restart apache.
Add new DNS record at Cloudflare which pointing “test” to the server IP.

It works! But is this safe / correct way to do it?
Will updating QuickBox override these setup?

And is there any way to change how the Deluge link on the Dashboard appears?
Like when I access the Dashboard using IP, it’ll shown as IP : Port .
When I use domain, it’ll shown as Domain : Port

So now I want it to be like if user access the dashboard using Domain, it shows link to their own Deluge Subdomain.

Edit : Forgot to test something, but Deluge ThinClient doesn’t work. This one, I have no idea what to do… :tired_face: