Cohosting other web sites on the same server as the application tier of Visual Studio® Team Foundation Server (TFS) is a common request and while it is not our typical scenario it is fairly easy to configure with IIS 6. Once you configure the IIS settings you will be able to install other web applications on the same IIS server and using the same TCP port (e.g. port 80). This is accomplished by configuring the host headers in IIS so that IIS will point Team Explorer and sharepoint requests to the correct web site.

Caution: If you are going through these steps before installing TFS; Windows SharePoint Services (WSS) service pack 2 should be installed before making these changes.

Launch Internet Information Services (IIS) Manager from the Administrative Tools and expand the Web Sites node.  If TFS is already installed you will have a Team Foundation Server node not shown in the figure below.

 

 

Now we need to remove the “(All Unassigned)” value from the sites and hardcode the values individually. 

  1. Right click Default Web Site and select Properties.
  2. Click the drop down arrow to the right of the IP address combo box and select the desired address from the list and click advanced.

  3. From the Advanced Web Site Identification dialog click Edit because we need to add the Host Header value for when this web site is requested. You will need to repeat this process for all “names” that the TFS site will be requested by (e.g. InternalHostName, tfs.MyFQDN.com, etc.)

  4. Add the following Web Site Identification:
    • IP address: 127.0.0.1
    • TCP port: 80
    • Host Header value: LocalHost

     

  5. Now repeat the process for the SharePoint Central Administration Site keeping the port number that was assigned when SharePoint was installed.

         


The following step must be completed after Visual Studio® Team Foundation Server has been installed successfully.

  1. Repeat the process again, this time using the Visual Studio® Team Foundation Server port (8080).

         

 

That's all there is to it... Now you can go ahead and create a new site on this server and give it a unique host header and it can even use port 80. Make sure that your organization's name resolution infrastructure is configured properly (DNS, WINS, HOSTS, LMHOSTS) so that requests for a web site will pass the correct header to IIS. If for example I wanted to host a custom web application on the same server I could add a CNAME DNS entry that points www.mywebsite.com to 192.168.1.218 and I would add an additional Web Site to IIS and configure it with port 80 and a host header value of 'www.mywebsite.com'.

Let me know if you have any questions using the comments on this blog; while this is an "unsupported scenario" I will do my best to assist you.

-bR
SDE/T | Team Foundation Deployment Techology Group (TFS-DTG)

 

This posting is provided "AS IS" with no warranties, and confers no rights.