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
}
}
}
# For HTTP protocol
## The domain name or the IP address of the proxy host and the port:
teamcity.http.proxyHost=proxy.domain.com
teamcity.http.proxyPort=8080
## The hosts that should be accessed without going through the proxy, usually internal hosts. Provide a list of hosts, separated by the '|' character. The wildcard '*' can be used:
teamcity.http.nonProxyHosts=localhost|*.mydomain.com
## For an authenticated proxy add the following properties:
### Authentication type. "basic" and "ntlm" values are supported. The default is "basic".
teamcity.http.proxyAuthenticationType=basic
### Login and Password for the proxy. Used only with the "basic" auth type
teamcity.http.proxyLogin=login
teamcity.http.proxyPassword=password
### Windows NT credentials for NTLM authentication. Used only with the "ntlm" auth type
teamcity.http.proxyAuthentication=NT_credentials
# For HTTPS protocol
## The domain name or the IP address of the proxy host and the port:
teamcity.https.proxyHost=proxy.domain.com
teamcity.https.proxyPort=8080
## The hosts that should be accessed without going through the proxy, usually internal hosts. Provide a list of hosts, separated by the '|' character. The wildcard '*' can be used:
teamcity.https.nonProxyHosts=localhost|*.mydomain.com
## For an authenticated proxy add the following properties:
### Authentication type. "basic" and "ntlm" values are supported. The default is "basic".
teamcity.https.proxyAuthenticationType=basic
### Login and Password for the proxy. Used only with the "basic" auth type
teamcity.https.proxyLogin=login
teamcity.https.proxyPassword=password
### Windows NT credentials for NTLM authentication. Used only with the "ntlm" auth type
teamcity.https.proxyAuthentication=NT_credentials
## The domain name or the IP address of the proxy host and the port
teamcity.http.proxyHost=123.45.678.9
teamcity.http.proxyPort=8080
## If the proxy requires authentication, specify the login and password
teamcity.http.proxyLogin=login
teamcity.http.proxyPassword=password