INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Apache2 Reverse Proxy for Webgizmo and Client Access  (Read 1029 times)

4n0n

  • Recent member
  • *
  • Posts: 9
Apache2 Reverse Proxy for Webgizmo and Client Access
« on: April 17, 2019, 01:58:25 am »

Hello,

Just bought the MC25 master upgrade and thought I would ask about something that I have been trying to get running for a while now. I have a setup for creating an SSH tunnel from a local raspberry pi installation to a server that is constantly on and acts as gateway for global access. If I connect directly to the port (2224) I specified everything works. However to make my URL more pretty I would love to have a reverse proxy (port 80 -> 2224). I did setup the reserve proxy already so I can access webgizmo through the same port. However when I want to to setup the library through mediacenter directly I can not use the reverse proxy as it only opens a library in read only mode and then displays nothing. I basically only used the following settings:

ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://localhost:2224/
ProxyPassReverse / http://localhost:2224/

Network:
(PI) --> (Server - reverse tunnel on 2224) <-- (Client - access on 2224)

I want:
(PI) --> (Server - reverse tunnel on 2224 and revers proxy on 80) <-- (Client - access on 80)

Do I need something else to make it work? The reason why I want the pretty solution is also because then I can use a Lets Encrypt certificate to handle the security and I do not need to worry about network sniffing. Can this be done easily? Am I missing something in the reverse proxy configuration? I tried to find a solution through the search function but I could not find anything that solved my issue. If I should provide more information I am more than happy to do so. :)
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13874
Re: Apache2 Reverse Proxy for Webgizmo and Client Access
« Reply #1 on: April 23, 2019, 03:45:37 pm »

This is interesting...

Why not just put the cert on MC on the Pi and port forward to it on it's normal port (in this case the SSL would be 52200) from your server?
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
Re: Apache2 Reverse Proxy for Webgizmo and Client Access
« Reply #2 on: April 23, 2019, 03:50:04 pm »

I'll give this a try tomorrow, I have a reverse proxy on my MC server box anyway for some other services. Should probably be easy to fix, likely some check that tries to ensure we connected to what we really expected.
Logged
~ nevcairiel
~ Author of LAV Filters

4n0n

  • Recent member
  • *
  • Posts: 9
Re: Apache2 Reverse Proxy for Webgizmo and Client Access
« Reply #3 on: April 23, 2019, 07:07:25 pm »

bob that's an interesting Idea....I will try to check how I can do that with Lets Encrypt on the weekend. Maybe this is actually the far easier way to do it (Except for pretty URLS). As soon as I tried it I will report back. :D

EDIT (a few months later):
I just updated my PI to the newest MC version (from 22 to 25) and with my Proxy rules and the Let's Encrypt cert in place everything worked automatically. It really must have been a problem with the old web interface that did not play well with the forwarding. Now everything works as intended. I just updated the post in case someone finds this when attempting something similar.
Logged
Pages: [1]   Go Up