Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I setup TeamCity for public access over https?

How do I setup TeamCity 4.0 so that I can access it over port 443 on the internet? e.g. https://teamcity.mydomain.com

I am running IIS 7 on the same server that TeamCity is installed. I see two options:

  1. Setup TeamCity to use port 8443 and create a reverse proxy in IIS that routes requests to the TeamCity public IP address to the Tomcat port on the internal IP address.

  2. Setup Tomcat to run on a different IP address than IIS 7, and configure TeamCity to run on port 443.

I'm not sure on the details of either of these steps.

like image 355
Lance Fisher Avatar asked Dec 01 '08 18:12

Lance Fisher


People also ask

How do I install and configure TeamCity?

Install and run on WindowsRun the downloaded .exe file and follow the instructions of the TeamCity Setup wizard. The TeamCity web server and one build agent will be installed on the same machine. During the installation, you can: set the TeamCity Home Directory where TeamCity will be installed.

How do I access TeamCity?

Accessing the server via HTTPS All you have to do is use https:// links to the TeamCity server instead of http:// . To enable HTTPS connections from the TeamCity Visual Studio Add-in, point your Internet Explorer to the TeamCity server using https:// URL and import the server certificate into the browser.

How do I change my TeamCity port?

Changing Server Port To change the port of the installed/unpacked server, open the <TeamCity Home Directory>/conf/server. xml file and set another number in the not commented <Connector> XML node: <Connector port="8111" ... To apply the changes, restart the server by.


2 Answers

It requires configuring the bundled Tomcat server for https. See here:

http://confluence.jetbrains.net/display/TCD65/Using+HTTPS+to+access+TeamCity+server

and here:

http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

I also setup Tomcat to listen on just one IP Address. All of this turned out to be a real pain, and I still am not able to run TeamCity as a service. I can only run it at the command line. If I were going to do this over, I would install TeamCity to run on the default port, and reverse proxy to it using IIS7 Application Request Routing or Apache Virtual Directories.

[Edit] I have done this over, and I used IIS Application Request Routing to set up a reverse proxy. It works perfectly, and Team City upgrades are painless as well.

like image 134
Lance Fisher Avatar answered Oct 22 '22 22:10

Lance Fisher


If you are not expecting high server load you can avoid using IIS or Apache and enable SSL right in the Tomcat. This is simpler to configure. The only drawback is high CPU usage when client connects to the server (during negotiation stage), after that CPU usage is negligible.

like image 30
Pavel Sher Avatar answered Oct 22 '22 22:10

Pavel Sher