I recently set up a reverse proxy server on some some Docker containers using Nginx and it works as expected. I am reverse proxying on these containers themselves to applications being run on these containers.
I just don’t understand how the server receives the subdomain to decide where the request should be routed to.
As far as I know every domain is resolved by DNS-Servers and returns the IP address of the server, so the client can connect to the target server using the received IP. But apparently the client also appends the domain to the request, is that possible?
I do not have a clear explanation for that, because from my perspective the client connects to the target server using an IP, not a domain.