Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Apparently I deleted the default website on my server. That is, I have 3 and none seem to be the "Default", though one is listening on port 80 for blank headers. TFS wants one installed, how do I add it back?

Windows Server 2003, Datacenter Edition; IIS 5

Thanks.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Just add a new web site to your server and give it a blank host header. That means, it will acceppt all host headers (domains, also localhost etc.) which point to one of the server's IP addresses and are not associated to another web. Normally the default web's folder is "Inetpub\wwwroot", so set whis folder as "local path."

There is only one problem. Websites in IIS have a unique identification number. Some tools or application may want the "Default Web Site" to be W3SVC/1 which is the default ID. So, instead of following what I proposed above, there is another option. Use the adsutil script.

Make sure that there isn't a W3SVC/1 already there (you'll never know). In a command-line prompt go to the

 Inetpub\AdminScripts

folder and execute this:

cscript adsutil.vbs enum w3svc/1

If it comes back with "path requested could not be found" there is a problem. Do the following:

cscript adsutil.vbs enum w3svc

You should get: w3svc/Info w3svc/Filters and at least one w3svc/NUMBER where the NUMBER is what you need.

To find your new default web site number will take some looking up. Search using this:

cscript adsutil.vbs enum w3svc/###

putting the numbers you saw in the list.

Create the new W3SVC/1:

cscript adsutil.vbs create_vserv W3SVC/1

Copy it

cscript adsutil.vbs copy W3SVC/### W3SVC/1

Set it

cscript adsutil.vbs set w3svc/1/ServerComment "Default Web Site"
share|improve this answer

A possible solution can be found here: http://www.gafvert.info/iis/article/create_default_website.htm

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.