0

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

3
  • Then it's available from a predefined port. - Available from the internal company network or from the outside? All those domains have the same IP - Again, it depends on where are you trying to resolve those domain names from. Your company can have an internal DNS server responding something different (e.g. internal network address) than will be responded from the outside. And did you ever heard about the "wildcard DNS record"? Google this term. Jun 27 at 8:47
  • @IvanShatsky basically it's available from outside I can request those servers even from a device that uses WiFi which is not connected in any way with VPN. The thing also is that all those servers have the same IP address if I trace it the only difference is sub domain and what app is served
    – thatodz
    Jun 27 at 9:17
  • 1
    Then most probably it is a wildcard DNS record *.ourapp.com pointing to the dev server where nginx select an upstream to pass the request according to the Host HTTP request header (e.g. Host: b2-dev.ourapp.app) or request port number (or both), see How nginx processes a request documentation page. Jun 27 at 9:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.