0

Let's say **Service1 **is wordpress, nextcloud, some DMS or other nice stuff in a private network. Service1 is installed on NGINX at http://localip:1234**/**

The url to access service1 has to be https://my.org/**service1**

Nothing special I thought. But after hours of trial and error I am asking myself if it is even possible to forward /service1 to / ?!

(I had success when service1 was operating at http://localip:1234/**service1**)

Details: https://my.org resolves to my router, which forwards 443 to NGINX. NGINX is dockerized behind the router on its own ip in the private network.

When I try to reverse proxy https://my.org/service1 to http://localip:1234 service1 seems broken. I managed to get some http response from service1 but some elements and links were broken.

Andreas
  • 3
  • 1
  • 3
  • In general that should be possible, _unless_ that proxied server handles references in such manner, that the proxy logic is unable to handle them. For example absolute URLs assembled on the client side which point to the original URL, not to the proxy. – arkascha Mar 01 '23 at 07:48
  • You will have to be more specific in your question: what is your current implementation of rewriting rules (including the context of the front facing service and what specific requests do not work when your proxy implementation? What does "broken" actually mean, specifically? A timeout? An http status? Another strange thing happening? – arkascha Mar 01 '23 at 07:50
  • Sorry for coming back so late! In the meantime I found out that it's at least very tricky to to this with NGINX. Instead of proxy a service to a different url it's much easier to make a subdomain handeling the request and proxy it to this destination. Example: Access the service at https://service1.domain.org NGINX uses proxy_pass to http://seriveip:1234 I'll add some config example later. – Andreas Apr 19 '23 at 13:05

0 Answers0