The DNS server doesn't take ServerName from httpd.conf
Your browser doesn't route the request, the web server returns the correct page based in part on the Host HTTP Header sent by the browser.
When you type a URL in your browser and hit enter, the name is resolved to IP using DNS, and the browser sends an HTTP request to the IP returned from the DNS query.
HTTP headers form the core of the HTTP request. One of these is the Host, or domain name you typed in the browser.
Using an example Virtual Host definition.
The ServerName directive within your Virtual Host configuration is matched against the Host HTTP Header. So if you type
Apache will receive the request and try to match the Host header
with it's Virtual Host definitions. If it finds a a match, it will the use whatever is listed in the
In the example above
This could be either an index file as defined within the configuration, or a directory index if they are permitted.