views:

54

answers:

1

I'm having trouble setting up a clean development environment with all the web sites I'm working on. I'm working on up to 40 different web sites, and at least 5 of them simultaneously. I need them all to be in a site root, for URL management to work with all CMSes.

My first attempt was to use increasing port numbers for them, beginning with localhost:1000 and working upwards. Unfortunately, it took a great deal of looking up which port belonged to which web site, and it was very irritating.

My second try was mapping the irritating ports to real words using the hosts file. So I ended up with localhost.tele2, localhost.ikea, localhost.volvo etc. Unfortunately, this takes a long time to set up (cleaning and adding to the hosts file, setting web site with highest port number in IIS etc.) and regularly I have to flush the DNS cache in order to get some sites working that I've added/removed from the hosts file.

So how do I organize a lot of web sites in IIS7 nicely? Perhaps I've missed a very clever method that you're using.

A: 

i created a quick program that i press a button and a list of domains is set to 127.0.0.1 in my host file, and press another button and all these entries are removed so my computer goes back to normal.

RandyMorris
Do you mean iterating the web sites in the IIS7 machine.config and adding them to the hosts file programatically? I guess you don't mean that, but such a program would be pretty neat. If I get time, that would probably be my preferred route.
Simeon
Yes, I actually have a database of domains I work on but that method would work as well. It is really simple, just read and write a text file, make sure you have the correct permissions. I have a small window that has two buttons and turns red when local and green when remote.
RandyMorris