0

I have an IIS7.5 server (also running SQL Server) which has a server name of (say) dc-db.

On this server, my IIS default site runs correctly on http://localhost and http://dc-db

I want to load on a web app to run at http://management.dc-db

I have created the new site, and attempted to use the following bindings for host name:

  1. management.*
  2. management.dc-db
  3. management.dc-db.local

In all cases, I get the standard Internet Explorer cannot display the webpage

I should note that after each change the site was restarted.

I have read other acticles relating to wildcard subdomains, which is not what I want to do, and couldn't find anything useful in that regard. Happy to be corrected if this is a duplicate.

LuckySpoon
  • 71
  • 11
  • What happens when you ping management.dc-db? – Greg Askew Jan 22 '13 at 01:38
  • `Ping request could not find management.dc-db` – LuckySpoon Jan 22 '13 at 01:48
  • 1
    Hard to load that web page if the name cannot be resolve to an IP address. That name needs to exist in DNS. If you only need to test it on a local machine, you could use the local hosts file. – Greg Askew Jan 22 '13 at 01:50
  • I understand that Greg. What I'm trying to get is a way this can be setup without having to modify the hosts file on all the machines on the network. (I should add that this isn't on our own network but a clients'). If they run a DNS server, would adding a static DNS entry there to the IP address of the machine solve the issue? – LuckySpoon Jan 22 '13 at 01:53
  • 1
    Do NOT use the hosts file on anything other than your local machine and even then only if you can't use DNS. It's a maintenance nightmare. As for DNS, you can create either an A or CNAME record. – John Gardeniers Jan 22 '13 at 02:21
  • @LuckySpoon: I would just add that DNS entry and test it. – Greg Askew Jan 22 '13 at 02:24
  • @JohnGardeniers: Agreed. – LuckySpoon Jan 22 '13 at 02:46
  • 1
    As far as I understood, dc-db is your server name and not your local domain, right? If so, I advise you to create a local domain, such as `lab.local` or something like so you may have proper hostnames to bind to: `dc-db.lab.local` and `management.lab.local`. Otherwise you won't have a proper DNS zone and may stumble upon another nightmare. – fboaventura Jan 26 '13 at 03:43

2 Answers2

1

If they run a DNS server: Add a new Forward Lookup Zone, choose primary zone, and add subdomains to this local zone. Add A records for every subdomain you want to use, point them to the machine with the IIS server.

Then you can add the websites to IIS the way you did.

Make sure that all PCs use this DNS server.

This allows you to use any domain name on your local network. Make sure not to overwrite existing ones though, as that would break the original website.

sorcix
  • 86
  • 1
0

What you can do is "Stop" the localhost IIS site and enable the management.dc-db IIS site and then type in localhost. Switch back and forth as needed. As of right now, IIS should complain about duplicate "*" bindings on port 80.

Better option: What you can do is add a second IP address eg. 192.168.0.5 to computer (Open Network and Sharing Center => Change Adapter Settings => Right Click Adapter/Connection => Properties => Highlight Internet Protocol Version 4 TCP/IP4 => Properties => Advanced => IP Settings => Add) Windows 7 in mind, with a static IP set, DHCP will not work.

After all this is done, you go and add New website in IIS. When it asks for binding information, instead of allowing "*" change it to the new IP you created above (192.168.0.5). Type in 192.168.0.5/index.html in url to access secondary site.

Both sites are readily accessible. (site1: localhost, site 2: 192.168.0.5/index.html). Add more IP's for however many sites you add.

invulnarable27
  • 183
  • 1
  • 3
  • 8