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?

link|improve this question
feedback

2 Answers

up vote 0 down vote accepted

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/

link|improve this answer
feedback

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.)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.