Configure SSL on Rancher using Nginx

Hello,

We have a rancher instance running without SSL, currently we are running on configuring SSL on Rancher Using Nginx but we are running into issues.

Steps Taken to enable:

Installed Nginx container running below command:

docker container run --detach --publish 8080:80 --name nginx nginx

Configuration:

/etc/nginx/conf.d/rancher.conf

upstream rancher {
server frosty_wozniak:8080;
}
map $http_upgrade $connection_upgrade {
default Upgrade;
‘’ close;
}
server {
listen 443 ssl;
server_name $URL;
ssl_certificate /tmp/certs/example_certificate.pem;
ssl_certificate_key /tmp/certs/example.key;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

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://rancherd;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “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 $URL;
return 301 https://$server_name$request_uri;

And after we restarted our nginx container and rancher container we are seeing errors in our docker logs as below

WARNING: 2018/12/10 19:49:17 grpc: addrConn.createTransport failed to connect to {0.0.0.0:2379 0 }. Err :connection error: desc = “transport: authentication handshake failed: EOF”. Reconnecting…
WARNING: 2018/12/10 19:49:28 grpc: addrConn.createTransport failed to connect to {0.0.0.0:2379 0 }. Err :connection error: desc = “transport: authentication handshake failed: EOF”. Reconnecting…

Please help if we are missing anything.

Thanks,