TeamCity Server - Configure HTTPS binding with specific hostname to avoid port conflicts
Good afternoon,
I've configured TeamCity currently to use HTTPS over 8443 instead of 443 as we have other applications running on the same host that are bound to 443 as well. In each of those other applications, I can create/edit the binding to bind it to a specific hostname, so that the server won't create conflicts with other applications hosted on the same port.
I've tried to figure out how to do this in TeamCity 2023.05, but I can't find a way to do it. Older and 3rd party documentation talk about amending the Tomcat server.xml config file to create an additional listener, and specified the hostname with the 'hostName' attribute. That being said, none of this config actually seems to get used as there's another config (https-settings.xml) sitting in C:\ProgramData\JetBrains\config that seems to hold the HTTPS settings that are configured in the web application itself. This seems to be constructed in its own proprietary schema that doesn't appear to be documented anywhere, and I am struggling to find any public references to this setup.
Can anyone clarify if this is possible in TeamCity 2023.05, and if so - how I would go about it? I don't really want to hack the https-settings.xml file, as it's likely going to get overwritten anytime the settings are updated in the UI.
Any thoughts or help would be greatly appreciated!
Thank you!
Evan
Please sign in to leave a comment.
we have a similar request here, also to cover the use case of shared ports within a single machine https://youtrack.jetbrains.com/issue/TW-79163/Add-the-possibility-to-specify-the-address-interface-on-which-to-listen-for-incoming-HTTPS-connections-when-configuring-the - I'm afraid it's not possible by default
If you need this, you will need to forego the UI-based HTTPS settings and force the settings to go manually through tomcat.
Alternatively, you could use a reverse proxy in front of teamcity that would let you manage ports and connections for your services in a single place.
I haven't tried with the new TC settings, but did used to have it working with the tomcat config changes.
However, since I have the same issue with several applications, I now have set up a reverse proxy in IIS (it's pretty simple with some googling). And can use any dns/port combo I want in iis and have the reverse proxy redirect to the local application (TeamCIty).