Icon

You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

 

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Versions 1.3+ are recommended. Earlier versions do not support the WebSocket protocol, so use the settings noted in the previous documentation version.

Code Block
http {
    # other... default settings here
    proxy_read_timeout     1200;
    proxy_connect_timeout  240;
    client_max_body_size   0;
 
	map $http_upgrade $connection_upgrade {
        default upgrade;
        '' '';
    }
    
    server {
        listen       400;
        server_name  teamcity.public;
    
        location /tc {
            proxy_pass          http://teamcity.local:8111/tc;
            proxy_http_version  1.1;
            proxy_set_header    Host $server_name:$server_port;
            proxy_set_header    X-Forwarded-Host $http_host;    # necessary for proper absolute redirects and TeamCity CSRF check
            proxy_set_header    X-Forwarded-Proto $scheme;
            proxy_set_header    X-Forwarded-For $remote_addr;
            proxy_set_header    Upgrade $http_upgrade;
            proxy_set_header    Connection $connection_upgrade;
        }
    }
}

Some other NGINX settings must be changed as well:

 

No Format
http {
    proxy_read_timeout     1200;
    proxy_connect_timeout  240;
    client_max_body_size   0;
    ....
}



Wiki Markup
{hidden-data}
some more NGINX params which might also relate:

client_header_timeout  10m;
client_body_timeout    10m;
send_timeout           10m;
proxy_max_temp_file_size 10240m;
{hidden-data}
Where client_max_body_size controls the maximum size of an HTTP request. It is set to 0 to allow uploading large artifacts to TeamCity.

...