Hello everyone. I’m trying to redirect http queries through nginx to rancher server, that running in the docker container.
Here is my setup:
Docker:
Nginx container called “nginx”, eposed ports 80==>80/ 443==>443
Rancher server container, called “rancher” 8080==>8080
Nginx:
upstream rancher {
server 127.0.0.1:8080;
}
. . .
. . .
location /rancher {
proxy_pass http://rancher;
}
But when i testing this out in the browser, it’s not working. I’ve got just empty page with “Loading” in the header. In the console, i’ve seen that the webbrowser is searching site’s files in the wrong container (the nginx container, not rancher):
Why proxy_pass directive is’nt working? I’ve tryed to set different addresses in the “server” block of nginx configuration file, like: 127.0.0.1:8080/ 0.0.0.0:8080/ 192.168.13.132/8080. The result always is the same. Please help me.
Regards.