English Forums > Web Proxy Filtering and Caching

Nginx Plugin Reverse Proxy for sub-domains

(1/2) > >>

CaptainSandwich:
Hi all,

I currently have nginx running on a home server within my network to serve as a reverse proxy, directing subdomains like emby.mydomain.com to an internal IP and port combination. I'm now looking to make use of the nginx plugin within opnsense to serve the same function, though I'm having a bit of a hard time going from the nginx.conf to a gui configuration in the plugin.

Specifically, I don't seem to be able to get subdomains to direct correctly. As I mentioned, I'm trying to get emby.mydomain.com to redirect, however it just times out. Navigating to just mydomain.com however loads emby, as does the IP of the opnsense router (opnsense webgui is running on port 8080). I've followed through the how to, but I'm not really sure where I'm going wrong or why this isn't working. Could someone please have a look over the below steps I've taken and give any pointers? Thank you very much.

All defaults where not specified

Upstream Server
Description: Emby Server
Server: 192.168.0.100
Port: 8096
Server Priority: 1

Upstream
Description: Emby Upstream
Server Entries: Emby Server

Location
Description: Emby Location
URL Pattern: /
Upstream Servers: Emby Upstream

HTTP Server
Server Name: emby.mydomain.com
Locations: Emby Location


fabian:
Timeout is usually a sign that you either have to reload nginx or are missing a firewall rule to allow the traffic.

CaptainSandwich:
Hi Fabian,

I'm not sure it's either. Being able to load emby by navigating to mydomain.com, I assume the firewall rules I have added are working (Port 80 and 443 passed to this firewall via WAN interface). Port 8096 is not forwarded so emby shouldn't be accessible without nginx running, and indeed is not when the service is stopped.

CaptainSandwich:
Should the below configuration be working as I expect it to, emby.mydomain.com -> 192.168.0.100:8096, or is there something fundamentally wrong with my config?

Upstream Server
Description: Emby Server
Server: 192.168.0.100
Port: 8096
Server Priority: 1

Upstream
Description: Emby Upstream
Server Entries: Emby Server

Location
Description: Emby Location
URL Pattern: /
Upstream Servers: Emby Upstream

HTTP Server
Server Name: emby.mydomain.com
Locations: Emby Location

fabian:
That should work.

Navigation

[0] Message Index

[#] Next page

Go to full version