OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: p3tter on March 01, 2022, 08:12:38 pm

Title: NGINX Reverse Proxy - subdomains
Post by: p3tter on March 01, 2022, 08:12:38 pm
Hi,
I'm pretty new on the OPNsense side, and im trying to configure the NGNIX plugin as a reverse proxy for subdomains.

what I want is to map:
 x.root.domain -> 192.168.1.10
 y.root.domain -> 192.168.1.11

if I only have 1 location and use / as the URL pattern it works for that single sub domain.
I have tried with x.root.domain/, x.root.domain/* etc with all the different match types without any success.

any tips would be appreciated!
Thanks,
Peter
Title: Re: NGINX Reverse Proxy - subdomains
Post by: fabian on March 02, 2022, 06:08:05 am
Add everything twice. From the upstream server to the HTTP server.
Title: Re: NGINX Reverse Proxy - subdomains
Post by: CoolDuke on May 25, 2022, 10:54:53 am
same issue here...

a have several service with a acme wildcart certs...

I have 3 HTTP server, 3 locations, 3 upstreams und 3 upstreams server..

eg. gotify.xyz.com --> local lan:7478
 bookstack.xyz.com --> laocal lan:8888

the problem is, that only the first entry (gotify.xyz.com) is working. when I want to access bootstack.xyz.com, I also got to gotify.

Does anybody know how to solve that?

thanks
Title: Re: NGINX Reverse Proxy - subdomains
Post by: fabian on May 25, 2022, 07:58:34 pm
Click on the reconfigure button.
Title: Re: NGINX Reverse Proxy - subdomains
Post by: CoolDuke on May 26, 2022, 06:23:48 am
you mean restart button - between start and stop? to reload the config? I alreay did that multiple times...

what is interessting: when I want to access abc.domain.com and get to 123.domain.com (which I dont want), I get a log entry with a "referer: 123.domain.com".

where does the referrer come from?

I simply want a setup (with a wildcard cert)

abc.domain.com -> to LAN1:port1
yuo.domain.com -> to LAN3:port
123.domain.com -> to LAN1:port2
890.domain.com -> to LAN2:port (with HTTPS)

but I can only achieve to reverse proxy the first two cases...

thanks
Title: Re: NGINX Reverse Proxy - subdomains
Post by: fabian on May 28, 2022, 04:34:53 pm
not restart - that will *NOT* regenerate the config. It will do what service control is expected to do - restart only.
The reconfigure button is *ALWAYS* on the bottom of the pages or it will be done when clicking the apply button.