Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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/

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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