0

I have a server with three sites on it (the default site and two applications). I want to set up some test sites (classic ASP) on the server but if I put them under Default Web Site I can't set them as the root for their own applications.

In other words, my application uses non-relative paths and I want to be able to test the thing without redoing how I do my includes all over the app.

What are my options? I thought about setting up Host Headers but I don't have access to any name resolution for the server- that's handled by someone else.

Caveatrob
  • 111
  • 1
  • 3
  • 12

2 Answers2

1

If you want to setup TEST sites then you can use Host Headers and just modify the hosts file on the local machine(s) connecting to the test site. I do this all the time. If you want many people to "test" these sites, then that won't work but if it's just you and a couple of others, this should work nicely.

Multiverse IT
  • 1,825
  • 9
  • 11
  • In my case, I VPN into the domain (let's call it Sample.Com) and to the web server (Server.Sample.Com), which is accessible both inside the network (the Sample.Com domain) and outside (the Internet). I was under the impression to use Host Headers, I'd need to make DNS changes on the DNS server for Sample.Com to coordinate with the Host Headers. For example, if I wanted Test1.Server.Sample.Com to be a root app, I'd need to set the DNS server at Sample.Com to forward Test1.Server.Sample.Com to Server.Sample.Com. Or am I making this too hard? – Caveatrob Oct 25 '11 at 03:39
  • For testing from your own machine, you don't need dns changes. modify the HOSTS file on your local workstation and create entries for each hostname (which corresponds to the web site in IIS running with your custom host header entries) and the IP address that host should resolve to. Your browser will use the hostname to populate the "Host: " http header and IIS will route to the correct web site instance. – mahnsc Oct 25 '11 at 12:30
  • Okay but to set up testing for my client on the internet I do need to make dns changes. – Caveatrob Oct 25 '11 at 19:44
  • Is there any way to set up an IIS-root-level rewriting thing to make the urls work? – Caveatrob Oct 25 '11 at 19:44
  • Sorry if I wasn't clear enough - if YOU - as in you are the only person who needs to access this - want to have a test/dev site, then you can do this with a Hosts file and not worry about DNS. If there are 3 or 4 or 5 of you (ie, a small number) you can instruct the others to do it too. If you want to create a dev/test site that will be used by dozens, hundreds, or as a "public beta" than this is NOT a practical solution. – Multiverse IT Oct 25 '11 at 20:02
  • Think about like this (and this may be oversimplifying)... The browser notes the URL you request and asks the computer for the IP of that URL. Your computer, instead of going to DNS, checks the hosts file first and finds it should be on the desired IP and so it sends the browser there. When the browser connects to that IP, it says it's looking for "this" URL and the server serves it -- DNS never enters the picture - it was overridden with the hosts file. – Multiverse IT Oct 25 '11 at 20:04
  • So how would I configure the test sites - as websites on the server with anything in the host headers? And the IPs? – Caveatrob Oct 25 '11 at 22:11
  • As web sites with host headers that you want. Pretend the DNS folks have said yes to your request. Then, instead of having the DNS folks set things up in DNS, you just set things up in the hosts file. – Multiverse IT Oct 27 '11 at 02:07
0

Any newly created website needs at least one or more unique values for any of the following binding options:

  • Protocol (http, https)
  • IP Address
  • Port number
  • Hostname

The easiest for your situation is possibly to use a different port number.

Marco Miltenburg
  • 1,121
  • 8
  • 9