General discussion

  • Creator
    Topic
  • #2297084

    Multiple Websites On 1 IP on 1 Server

    Locked

    by gregberry ·

    We have w2k server running iis 6, we have two domains, i’ll call them domain1.com and domain2.com. We want to host both sites on one server with one ip address. We know this is possible because we have used this setup for about a year. We recently relocated our server from a Co-Location facility to in house. Ever since then it hasn’t work. I had to change our IP on our server, but I did not make any changes to the host header information in iis (except for the ip address, which was done automatically).

    I tried several different configurations. The way it is configured right now is domain1.com has ip address all unassigned and on port 80 with no hostheader, I have domain2.com setup with ip at all unassigned, port 80 and host header of “domain2.com” (without quotes). I tried setting domain2.com’s ip to 192.168.1.5 (which is the lan ip of this server). I also tried setting up a second ip on the nic and setting domain2.com to that then opening the ports up on the router, but that didn’t work either.

    Any suggestions or ideas?

All Comments

  • Author
    Replies
    • #2685539

      Reply To: Multiple Websites On 1 IP on 1 Server

      by mikelazz ·

      In reply to Multiple Websites On 1 IP on 1 Server

      I would start here first. 1.) can you access the domains internally? 2.) make sure that whomever you registered the domains with has the public IP is assigned to your router/firewall. 3.) On the router/firewall, there should be a setting to configure the http request to forward to the internal web server ip.

    • #2685533

      Reply To: Multiple Websites On 1 IP on 1 Server

      by carlos.nino ·

      In reply to Multiple Websites On 1 IP on 1 Server

    • #2685507

      Reply To: Multiple Websites On 1 IP on 1 Server

      by gregberry ·

      In reply to Multiple Websites On 1 IP on 1 Server

      I should have made it clear that the default website is up and running, it’s just that when you try to go to domain2.com it opens up domain1.com’s site.

    • #2685506

      Reply To: Multiple Websites On 1 IP on 1 Server

      by cg it ·

      In reply to Multiple Websites On 1 IP on 1 Server

      first is best practice on web servers is to have them as stand alone and not on the network. They are notorious for being hacked. If you have that setup and are not running ISA server, just the web server and a router, setup a static IP scheme on the web server with the default gateway as the router and the DNS server as your ISP server. Next configure the router to foward port 80 traffic to the web servers static IP address. Third is create web sites in IIS using all unassigned and port 80 host headers for each web site with the registered domain name. Hosting multiple web sites requires host headers for each site.
      Next is DNS resolution. If you have a name server running then you have to make sure that A records exist for both domain name(s). Then make sure your domain name registrar uses your name server for name to IP address resolution.

      If you don’t have a name server, you can buy a monthly Name Server service from places like Constant Time DNS.

      That about sums it up.

      Microsoft Technet has some good articles about hosting multiple web sites using IIS. You can check those out as well.

      • #2685495

        Reply To: Multiple Websites On 1 IP on 1 Server

        by gregberry ·

        In reply to Reply To: Multiple Websites On 1 IP on 1 Server

        I respectfully disagree with your best practice of having web servers stand alone from a network. With our web integrated app, it is extremely helpful to have the server on our network. Our router is configured correctly, and we use our ISP for DNS. Please remember that the server is up, everyone can access domain1.com, the only problem is domain1.com’s website is coming up if you put domain2.com in your browser. This has nothing to do with DNS, it has to do with IIS settings. By the way when host headers are setup for both domains, neither work.

    • #2685505

      Reply To: Multiple Websites On 1 IP on 1 Server

      by gregberry ·

      In reply to Multiple Websites On 1 IP on 1 Server

      Yes we can access domain1.com internally, but not domain2.com. Domain2.com pulls up domain1.com

    • #2685483

      Reply To: Multiple Websites On 1 IP on 1 Server

      by kinetechs ·

      In reply to Multiple Websites On 1 IP on 1 Server

      On the DNS side of things, make sure you have default records setup that point to the IP of the web server. Since your Host Header is the domain name (e.g. domain1.com) and not the FQDN (e.g. http://www.domain1.com) there must be a default record in the DNS zone for each domain. A default record is an address (A) record with an IP address only…no host name.

      Good luck,
      Sean

    • #2685430

      Reply To: Multiple Websites On 1 IP on 1 Server

      by cg it ·

      In reply to Multiple Websites On 1 IP on 1 Server

      you didn’t read my answer……..both domains have to use all unassigned IP port 80 and both have to use host headers.

      Name server MUST have BOTH domain names “A” record pointers to your single IP address. Another problem that arises is a Tar record in DNS that isn’t updated with new IP to name addresses. If you change your IP address {or your ISP does} and doens’t have dynamic update service, the internet wide “Who IS” inquiry on registered name servers won’t get updated information on your domain name to IP address resolution.

      Note: IIS is sending ALL web request traffic on port 80 to your single web site and will always do so unless host headers are used to distiguish between sites.

      Again Microsoft Technet has an article on hosting multiple web sites in IIS with one nic and a single IP address. Article # 324287 How To Use Host Header Names to configure multiple web sites in IIS 6.0 Article # 308163 deals with the same topic for IIS 5.0
      Quote off of article # 324287: ” Microsoft Internet Information Services (IIS) permits you to map multiple Web sites with the same port number to a single IP address by using a feature called Host Header Names. By assigning a unique host header name to each Web site, this feature permits you to map more than one Web site to an IP address.
      “Multiple host names must be mapped to the single IP address by using a DNS server or a Hosts file.”

      • #2685427

        Reply To: Multiple Websites On 1 IP on 1 Server

        by cg it ·

        In reply to Reply To: Multiple Websites On 1 IP on 1 Server

        if IIS is configured that is using all unassigned IP port 80 with a host header www. and is configured to use all unassigned IP port 80 with host header www. and your not getting any external inbound traffic, then it’s a DNS IP to Name resolution problem which would be your ISP.

      • #2685283

        Reply To: Multiple Websites On 1 IP on 1 Server

        by gregberry ·

        In reply to Reply To: Multiple Websites On 1 IP on 1 Server

        Poster rated this answer.

    • #2685419

      Reply To: Multiple Websites On 1 IP on 1 Server

      by saaedb ·

      In reply to Multiple Websites On 1 IP on 1 Server

      okie this is how you can host multiple sites on the same server under the same IP.
      Make a new site in IIS, lets say you set its Name (Description) to Site1.com, and its URL is http://www.domainname.com. Sets its IP to be XX.XX.XX.92. click on the advance button under the general tab, and add host headers for it, in the host header add all the URL for this site.

      For your second site, make a new site again, call it site2.com(description),keep the same IP for it XX.XX.XX.92, click the advance button under the general tab, and its HostHeaders there, i.e http://www.AnOtherDomainName.com and so forth.

      IN the DNS records for your Sites, point both the URL’s to the same server. and let IIS handle it from there :-).

      And if you want to hit the sites internaly, then you have to add another step, coz when you host multiple sites on the same server with the same IP, IIS differentiates between the two on the basis of the Hostheaders (DomainName). But internaly when you hit the site, you prolly are hitting it with the Machine Name or the IP for the Machine. In this case IIS can’t figure out which one of the two sites you are asking for, coz there is not host header info present in your request, so IIS would pull up the first Site in the list with that IP. If you want to be able to hit the sites internaly as well, then you would need to Add the sites to your internal DNS, and point it to your IIS, and hit the sites with the Domain Name in your internal Server.

      Hope all this helps.

    • #2685401

      Reply To: Multiple Websites On 1 IP on 1 Server

      by joseph moore ·

      In reply to Multiple Websites On 1 IP on 1 Server

      Come on here! DR is EXACTLY right on the Host Header configuration, and the non-Domain membership configuration. Don’t get on his case about it. IF your web server, as a domain member, is hacked and compromised, then it could be used as a launching pad to attack the REST of your domain, including your Domain Controllers, File Servers, etc. So, think about it.
      Anyway, the link to the good Host Header Technet article DR posted is here:

      http://support.microsoft.com/?kbid=324287

      Go there and READ IT!
      “Microsoft Internet Information Services (IIS) permits you to map multiple Web sites with the same port number to a single IP address by using a feature called Host Header Names. By assigning a unique host header name to each Web site, this feature permits you to map more than one Web site to an IP address.”

      Your attitude toward DR’s exactly correct answers to your problem irritated me. Face it: DR was right, and you are wrong!

      Sorry for the tough love here, but it is the truth.

    • #2685280

      Reply To: Multiple Websites On 1 IP on 1 Server

      by gregberry ·

      In reply to Multiple Websites On 1 IP on 1 Server

      This question was closed by the author

Viewing 9 reply threads