编辑 如果您正在运行其他网站,并且除了遵循第 2 部分之外,还收到 404您需要创建一个虚拟站点来捕获主机名,如下面的 Ian Patrick Hughes 回答所述。
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:
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.
添加到 Johannes Rudolph 的答案中...Jon Alb 的文章是对在 IIS 7.5 中公开 Team City 进行简单细分的最佳选择。 唯一要提到的是,如果您在该服务器实例上运行其他站点,则在执行他的 第二部分,您可能需要创建一个虚拟站点来查找子域主机标头值,因为如果没有匹配的站点,IIS 似乎从未执行我的场重写 url。 但是,如果您想保护端口 80 上的 Team City 登录页面,这也应该允许您使用 HTTP 身份验证。
To add to Johannes Rudolph's answer...The Jon Alb article is the best for a simple breakdown on exposing Team City in IIS 7.5. The only thing to mention is that if you are running other sites on that server instance, after you follow through his second part, you might need to create a dummy site looking for a subdomain host header value because it seemed like IIS never executed my farm re-write url if there was no site that matched. However, this should also allow you employ HTTP Authentication if you want to protect your Team City login page on port 80.
发布评论
评论(4)
使用 IIS 7.5,您可以使用应用程序请求路由将
teamcity.server.domain.com:80
的请求路由到server.domain.com:81
的 Tomcat。 我认为这种方法更优越,因为 Tomcat 连接器在 WS2008 x64 下似乎有点不稳定。Jon Alb 有一篇关于如何在 WS2008 上配置 TeamCity 和 IIS 的精彩文章:
此外,您需要确保您的 DNS 可以解析
teamcity.server.domain.com< /code> 到
server.domain.com
。 我的 IIS 服务器需要ipconfig /registerdns
来正确更新其 DNS 条目。 在这种情况下,正确意味着要在domain.com 查找区域中为服务器
创建一个域 条目,简单的A 记录是不够的。 在该域中,您需要为 * 创建 CNAME 记录,因此任何子域都将被重定向到server.domain.com
我遇到的一个大问题是 IIS 7.5 似乎不再正确编写
applicationHost.config
文件,因此端口号最终不会被保留。 这将导致令人讨厌的400.0 Bad Request
错误,因为将达到 MAX_FORWARDS 限制(请求植根于圆圈)。要解决此问题,请将以下内容添加到
C:\Windows\System32\inetsrv\config
:编辑 如果您正在运行其他网站,并且除了遵循第 2 部分之外,还收到 404您需要创建一个虚拟站点来捕获主机名,如下面的 Ian Patrick Hughes 回答所述。
With IIS 7.5 you can use Application Request Routing to route requests at
teamcity.server.domain.com:80
to Tomcat atserver.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
toserver.domain.com
. My IIS server needed aipconfig /registerdns
to update its DNS entry correctly. Correctly means in this case to create a Domain entry in the domain.com lookup zone forserver
, a simple A-Record does not suffice. In that domain, you need to create a CNAME record for * , so any subdomain will be redirected toserver.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 nasty400.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
: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.
添加到 Johannes Rudolph 的答案中...Jon Alb 的文章是对在 IIS 7.5 中公开 Team City 进行简单细分的最佳选择。 唯一要提到的是,如果您在该服务器实例上运行其他站点,则在执行他的 第二部分,您可能需要创建一个虚拟站点来查找子域主机标头值,因为如果没有匹配的站点,IIS 似乎从未执行我的场重写 url。 但是,如果您想保护端口 80 上的 Team City 登录页面,这也应该允许您使用 HTTP 身份验证。
To add to Johannes Rudolph's answer...The Jon Alb article is the best for a simple breakdown on exposing Team City in IIS 7.5. The only thing to mention is that if you are running other sites on that server instance, after you follow through his second part, you might need to create a dummy site looking for a subdomain host header value because it seemed like IIS never executed my farm re-write url if there was no site that matched. However, this should also allow you employ HTTP Authentication if you want to protect your Team City login page on port 80.
您需要 Tomcat 和 Tomcat 的 IIS 连接器。
You need Tomcat and the IIS connector for Tomcat.
在 IIS 7 中托管 TeamCity 的分步指南
http://blog.endjin.com/2010/11/a-step-by-step-guide-to-hosting-teamcity-in-iis-7/
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/