Icon

You are viewing the documentation of TeamCity 2018.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.

...

Code Block
http {
    # ... default settings here
    proxy_read_timeout     1200;
    proxy_connect_timeout  240;
    client_max_body_size   0;    # maximum size of an HTTP request. 0 allows uploading large artifacts to TeamCity
 
	map $http_upgrade $connection_upgrade { # WebSocket support
        default upgrade;
        '' '';
    }
    
    server {
        listen       400; # public server port
        server_name  teamcity.public; # public server host name
    
        location / { # public context (should be the same as internal context)
            proxy_pass          http://teamcity.local:8111/; # full internal address
            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; # WebSocket support
            proxy_set_header    Connection $connection_upgrade; # WebSocket support
        }
    }
}

Wiki Markup
{hidden-data}
Some NGINX configuration resource: https://nginxconfig.io/
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}
Note: Some TeamCity resource names might start with "." symbol (e.g. hidden artifacts under .teamcity directory), so make sure not to blindly deny resources with the name starting with dot.

...