问题原文
原帖链接 · Alec. · CC BY-SA 3.0
I see this a lot and I'm not sure how it works, the mechanics behind it. I've been asked if it's possible to host two sites, on the same Windows 2012 server on the same IP address but with different domains.
My question is what (and how does it) allows two different websites on the same IP be accessed by two different domains, for example what (and where) is the mechanism that decides www.a.com shows this and www.b.com shows this when the DNS entires for www.a.com and www.b.com are both 80.80.60.100?
已采纳解答
原帖链接 · user1431972 · CC BY-SA 3.0
Because HTTP request sent from browsers includes the host name. The server is able to identify it and serve the respective content.
In our world we have very limited IPV4 addresses but more websites. A web hosting company usually serves over hundreds of websites from the same server (same IP).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
