This describes how to set up routing in IIS7 using Application Request Routing to access a TeamCity instance on the same machine.
Why you want to do this is because you cannot run both IIS and TeamCity on port 80 but you would like to access TeamCity on port 80
1. TeamCity
Download and install TeamCity, set it to run at port 8080 and make sure it is up and running on http://localhost:8080
2. Application Request Routing
Download and install ARR from http://www.iis.net/download/applicationrequestrouting
3. Create a Server Farm
There should be a new node in your IIS beneath “Sites” named “Server Farms”
- Right click on that node and choose “Create Server Farm”.
- Choose a name for the farm (ex “TeamCity”) and click next.
- Enter “localhost” in the server address box.
- Click “Advanced settings…”, expand “applicationRequestRouting” and change the httpPort to 8080.
- Click Finish.
4. Configure Server Farm Routing
- Expand “Server Farms” and select your newly created Farm node.
- Double click on “Routing Rules”
- Click “URL Rewrite…” beneath “Advanced Routing” on the right.
- Double click on the single folder beneath Inbound rules.
- Set the top “Match URL” to Regular Expression and the Pattern to “.*”
- Expand “Conditions” and add “input={HTTP_HOST},Type=Matches the Pattern, Pattern=teamcity.internal-server.com”
- Click “Apply”
5. Done!
You should now be able to access TeamCity trough IIS7 via the url http://teamcity.internal-server.com/login.html




