Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


  • Windows Server 2008 R2 SP1
  • TeamCity 7.0.2
  • Tomcat 7.0.27
  • IIS 7.5
  • ARR 2.5
  • URL ReWrite 7.2.2

TeamCity is installed into a pre-existing TomCat installation as a JavaEE WAR. IIS has been successfully setup to reverse proxy calls for TeamCity. My rewrite rule is below:

<rule name="TeamCity Redirect" stopProcessing="true">
    <match url="^(TeamCity.*)" />
    <action type="Rewrite" url="http://localhost:8080/{R:1}" logRewrittenUrl="true" />

I have no problem logging into TeamCity from a remote host and using/administering it. However, when I enable the built-in NuGet server, I encounter a frustrating issue.

Trying to access the nuget feed from any remote host proxying through IIS gives me an HTTP 404 error. The 404 error comes from IIS. When I remove the final path part from the url, the 404 error comes from Tomcat.


So, somewhere I am having issues with IIS respecting a redirect with *.svc files, but for the life of me, I cannot figure out why, or where this is set.

Any help is greatly appreciated.

share|improve this question
up vote 1 down vote accepted

Seems you do not need any rewrite rules. Check TeamCity server context path is the same as in your public server, i.e. and http://localhost:8080/contextPath.

TeamCity uses request URI to generate NuGet feed, so you should make sure your proxy provides HOST, X-Forwarded-Host, X-Forwarded-Server, X-Forwarded-For headers. You may enable/check tomcat's access log to see what requests comes from IIS to TeamCity.

Please also take a look at the installation guide at

If this does not work, please attach server logs to

share|improve this answer
That definitely resolves the server url issue. – Joseph Alcorn Apr 26 '12 at 23:01

Ah, the power of posting. After asking the question, I decided to take a look at the rules I had setup one more time.

The rules were setup on the site level. I moved them to the server level, and everything works like a charm.

share|improve this answer
Adding the rule at server level definitively solved the problem. – Julien Lebosquain Aug 8 '12 at 18:10

Your Answer


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.