2021-11-05 15:06:45 +00:00
|
|
|
server {
|
|
|
|
listen 443;
|
|
|
|
server_name rancher.{{ pillar['network']['domain'] }};
|
|
|
|
ssl_certificate /etc/rancher/ssl/rancher-server.crt;
|
|
|
|
ssl_certificate_key /etc/rancher/ssl/rancher-server.key;
|
|
|
|
location /{
|
|
|
|
proxy_pass https://localhost:6443;
|
|
|
|
proxy_ssl_trusted_certificate /etc/rancher/ssl/rancher-server.crt;
|
|
|
|
proxy_ssl_verify off;
|
|
|
|
proxy_set_header Host $host:$server_port;
|
2021-11-08 10:17:51 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
2021-11-05 15:06:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name rancher.{{ pillar['network']['domain'] }};
|
|
|
|
return 301 https://rancher.{{ pillar['network']['domain'] }}$request_uri;
|
|
|
|
}
|