Can I help to clarify?
A when you buy/register a domain name you are required to point it at 2 DNS server addresses, Primary & Secondary.
These Domain Name Servers (DNS) tell the clients where to look for the IP adress of the server that hosts your domain{s}, This can be either one to many, many to many or many to one.
One to many = one domain pointing to many web servers "IP addresses" all hosting the same web pages, (usually called Round Robin DNS).
Many to many = a number of domain names pointing to a number of webservers.
Or What you were looking for:
Many to One = A number of domain names {2 in your case} pointing to one web server that has "virtual hosting of the two sites".
What then happens is as the client browser makes a request to
his/her PC looks at DNS and is told that
"resolves" to 123.456.789.1 and the browser then passes the request for a web page to that address. Now! in the information passed by the clients browser "header information" is a value that contains the domain name
the Web server at 123.456.789.1 sees this and says "I know where to send this" its one of my virtual servers who's root folder is \\share1\fredb\
If the client browser sends a header value of
to 123.456.789.1, then the server says "Aha! this is one of my virtual servers who's root folder is \\share1\bennyh\
So here endith todays lesson,
Believe me this over simplyfied and the domains & IPs are only for example.
I hope it helps?
L:¬)