-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrancher.conf
35 lines (29 loc) · 1.11 KB
/
rancher.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# HTTPS Configuration for rancher server
# terminates ssl at the proxy and proxy passes to rancher server
upstream rancherserver {
server ${RANCHER_CONTAINER_NAME}:${RANCHER_PORT};
}
server {
listen 443 ssl;
server_name ${RANCHER_URL};
ssl_certificate external/cert.pem;
ssl_certificate_key external/key.pem;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://rancherserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# This allows the ability for the execute shell window to remain open for up to 15 minutes. Without this parameter, the default is 1 minute and will automatically close.
proxy_read_timeout 900s;
}
}
server {
listen 80;
server_name ${RANCHER_URL};
return 301 https://$server_name$request_uri;
}