1

I host multiple domains on a GoDaddy shared hosting account. I would like to setup a website locally in IIS 7 that mimics the setup of my hosted account so that I can test and debug applications locally before deploying, as debugging after deploying, or discovering there are issues after deploying is frustrating.

I have created a folder WebRoot, at put my main application in that folder. I created a website in IIS 7 and pointed it at that folder. I setup bindings with a fake domain, and created a matching entry in my hosts file to make the fake domain point at my 127.0.0.1. I then created a folder www.otherdomain.com under webroot. I then created an application underneath my website, and pointed it at this folder. I can't find how I can add bindings to the web application to have it referenced as a different fake domain, rather than a subdirectory under my root domain.

What would be the proper way to setup IIS to best simulate the environment on the GoDaddy servers.

NerdFury
  • 121
  • 4

2 Answers2

1

Create a new web site entry for each new domain/folder combination and associate it with the appropriate application pool if needed.

Justin Scott
  • 8,748
  • 1
  • 27
  • 39
0

I'd say set up one folder and have all your domains as folders inside, as I think you already have. So your folder structure will look like this

E:\webRoot\www.domain1.com\ ... app files ...
E:\webRoot\www.domain2.com\ ... app files ...

Then just create a new website and point it to the corresponding domain name. And again use host headers in your Bindings to specify the different domain names. There is no need to create a website pointed to the webRoot folder, or even have file in it as it's only used to house your different domain name folders that are application specfic.

Tim Meers
  • 653
  • 6
  • 16
  • If I was hosting this, that is what I would do, but it is not what GoDaddy seems to be doing. My sub folders do appear to be application roots, so I can have application level settings in my web.config, but it still seems to be aware of settings in the root containing folder. So I have /webRoot/www.domain1.com and when I navigate to www.domain1.com in my browser, it gets to the right spot, then Asp.Net MVC Action links will put the folder into the url giving me http://www.domain1.com/www.domain1.com/home. The thing that stumps me is the app root web.config seeing the web.config in the parent. – NerdFury Jan 19 '10 at 17:21
  • That is very weird. I know it would work that way if using virtual directories. Then the application under the root will pick up the parent. But different web sites inside IIS should be isolated and not see any files in the parent folder because it is the parent folder/root of the web. – Tim Meers Jan 19 '10 at 19:13
  • Sure, but I don't think they are seperate 'websites' in IIS terminology. As I'm sure you know, you can create an application or a virtual directory under a website. I'm not sure if you are using website in terms of IIS 7 nomenclature, or just a general term. There are differences between applications and Virtual Directories, but I guess I just may never know. I did find the specific problem I was having (root app had a config setting that was not overridden in the sub app, and the parent value was not valid), but it would be nice to setup my dev environment like my prod env. Thanks for trying. – NerdFury Jan 19 '10 at 23:19
  • @NerdFury I'm having the same exact issue with Godaddy and an ASP.Net MVC webapplication that is a subfolder of the webroot. What was your solution? – Alex Aug 05 '10 at 03:16