Вместо того, что бы ходить к TeamCity по адресу вида http://teamcity.domain.local:8111 – можно добавить NGINX, который будет проксировать запросы с порта 80 на порт 8111 TeamCity.
Предполагается, что TeamCity уже установлен и настроен. Тут речь только о NGINX.
В отличии от настройки для Bamboo — тут требуются дополнительные параметры для NGINX.
Без этих параметров — TeamCity будет сообщать:
Some users cannot use optimized web UI updates via WebSocket protocol.
The following addresses were used by the affected sessions:
http://teamcity.domain.org.ua
Most probably there is not appropriately configured proxy server between the client browsers and the TeamCity server.
Создаём файл настроек, например — /etc/nginx/conf.d/teamcity.domain.org.ua.conf с таким содержимым:
map $http_upgrade $connection_upgrade {
default upgrade;
'' '';
}
server {
server_name teamcity.domain.org.ua;
listen 80;
access_log /var/log/nginx/teamcity.domain.org.ua.log combined;
location / {
proxy_pass http://127.0.0.1:8111;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $server_name:$server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
Проверяем:
# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Перезапускаем:
# service nginx restart Restarting nginx: nginx.
Готово.