-1

Can you please help me how I can adjust nginx configuration. so that how i can host my rancher via nginx

  1. I need help regarding the rancher application with nginx as reverse proxy

  2. as we run container of rancher using docker and our URL are like as below.

upstream backendrancher {
    server domain.com:8072;
}
location /rancher {
    rewrite ^/rancher(.*)$ /$1 break;
    proxy_pass http://backendrancher;
    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_cache off;
    access_log /var/log/nginx/rancher/access.log timed_combined;
    error_log /var/log/nginx/rancher/error.log debug;
 }
karel
  • 5,489
  • 46
  • 45
  • 50
Hidayath
  • 1
  • 2

1 Answers1

1

I talked to one of the technical team working with Rancher at NGINX. It appears that the preferred way to run Rancher in Kubernetes is via a management cluster. Some additional difficulty is involved but not too bad https://rancher.com/docs/rancher/v2.5/en/overview/architecture-recommendations/#environment-for-kubernetes-installations

However, you might want to take a look at getting your NGINX config set up. Some point of info might be https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/ https://github.com/productive-dev/minimal-reverse-proxy-demo https://rancher.com/docs/rancher/v1.5/en/installing-rancher/installing-server/basic-ssl-config/