I'm a web developer and at work we have different servers (we call them stands) for testing our deployed app.
In order to deploy our app we connect via ssh to one certain server and start a process in pm2
usually naming those like b2-dev-app
or b1-dev-app
the b part is defined in some list and there are a lot of possible names. Then it's available from a predefined port
We can access our apps from the browser or postman and the link to the app is something like https://b2-dev.ourapp.app
The question is how does this work?
From my networking knowledge, I assume that if it's available even without our company VPN all those names are in the global DNS but the server is just one and all those domains have the same IP (checked using some online IP checkers) which is something I haven't seen yet. If that help I'm pretty sure the app is served by nginx serving more as reverse proxy and there is also docker.
I tried to ask my coworkers but since it's out of my scope of work I'm not told a thing, don't have enough access to this information
*.ourapp.com
pointing to the dev server where nginx select an upstream to pass the request according to theHost
HTTP request header (e.g.Host: b2-dev.ourapp.app
) or request port number (or both), see How nginx processes a request documentation page.