0

I have two sites implemented in one machine. One site is hosted in IIS, and another is in Zend Server. Each site will have a domain, and I have only one IP to assign both.

How can I configure DNS so that both sites are accessed correctly from the internet?

Starfish
  • 2,735
  • 25
  • 28
Filipe Costa
  • 105
  • 5

2 Answers2

2

Only one process can listen on a particular IP:port combination, regardless of DNS. If you only have one IP address, and both sites must be accessible on port 80, you've got problems.

If you really can't get a second IP address or port, you will have to run a reverse-proxy on port 80 to listen to incoming connections, pick out the Host: header, and redirect the HTTP request to the appropriate server (which will be running behind the scenes on a non-80 port).

This could be a third server, or one of the existing servers if they have the ability to work as a reverse proxy (eg IIS with ApplicationRequestRouting.)

bobince
  • 811
  • 4
  • 8
0

You need to use "A" records for whatever domains you want to resolve to that IP address. Use CNAME records for subdomains. See this:

http://www.tech-recipes.com/rx/311/dnsbind-resource-record-cname-canonical-names-host-aliases/

Peter Loron
  • 168
  • 2
  • 8