Same public IP/port (443) → Nginx → different internal ports per app.
-
One IP, many services — An IP address is like a building’s street address. Ports are like apartment numbers. One building (IP) can have hundreds of apartments (ports), each holding a different service.
-
Nginx’s job is to sit at the front door (ports 80 and 443) and figure out which tenant (subdomain) the visitor is asking for.
User -> https://fileman.sh1re.net ---\
User -> https://transferdepot.sh1re.net --> Nginx :443 --> routes by Host/SNI -->
User -> https://wiki.sh1re.net ---/ |
+--> fileman -> 127.0.0.1:8083
+--> depot -> 127.0.0.1:8000
+--> wiki -> 127.0.0.1:3000All three names → same public IP → Nginx routes by name to different upstreams/ports inside.
Gotchas to avoid
-
Two
server {}blocks that claim the same name: make sureserver_namevalues don’t overlap unintentionally. -
Missing SNI/cert coverage: use a cert with SANs for all names or a wildcard
*.sh1re.net. -
A “catch‑all”
default_servercan steal traffic if a name doesn’t match—verify with:curl -I -H "Host: transferdepot.sh1re.net" http://<IP>
- Log in to post comments