Any ideas?
With IIS 7.5 you can use Application Request Routing to route requests at teamcity.server.domain.com:80
to Tomcat at server.domain.com:81
. I would consider this approach superior since the Tomcat Connector seems a bit flaky under WS2008 x64.
Jon Alb has a good writeup on how to configure TeamCity plus IIS on WS2008:
Additionally, you need to ensure that your DNS can resolve teamcity.server.domain.com
to server.domain.com
. My IIS server needed a ipconfig /registerdns
to update its DNS entry correctly. Correctly means in this case to create a Domain entry in the domain.com lookup zone for server
, a simple A-Record does not suffice. In that domain, you need to create a CNAME record for * , so any subdomain will be redirected to server.domain.com
A big problem I ran into is that IIS 7.5 seems to no longer correctly write the applicationHost.config
file, so the port number won't endup being persisted. This will result in a nasty 400.0 Bad Request
error because the MAX_FORWARDS limit will be reached (the request is rooted in circles).
To fix this, add the following to C:\Windows\System32\inetsrv\config
:
<webFarms>
<webFarm name="teamcity" enabled="true" adminUserName="" adminPassword="[enc:AesProvider:2blZ7roifGTktpn8zBBuVQ==:enc]" primaryServer="">
<server address="localhost" enabled="true">
<applicationRequestRouting httpPort="YOURPORTHERE!!!" />
</server>
<applicationRequestRouting>
<loadBalancing algorithm="WeightedRoundRobin" />
<protocol reverseRewriteHostInResponseHeaders="true" />
</applicationRequestRouting>
</webFarm>
</webFarms>
Edit If you are running other sites, and getting a 404, besides following Part 2 you need to create a dummy site to catch the hostname as the below Ian Patrick Hughes answer states.
A Step by Step Guide to Hosting TeamCity in IIS 7
http://blog.endjin.com/2010/11/a-step-by-step-guide-to-hosting-teamcity-in-iis-7/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With