Home > Blockchain >  Nginx proxy pass failed to proxy pass to Zipkin
Nginx proxy pass failed to proxy pass to Zipkin

Time:11-25

I'm having trouble exposing Zipkin UI (running in a container) behind Nginx. I have a spring microservices that I have deployed on an ec2 instance on AWS, and I used Nginx as a load balancer to map locations to upstream using proxy_pass, and I've configured a location mapped to Zipkin upstream just like this:

location /tracing/ {
   return 302 /tracing/;
}
location /tracing {
   proxy_pass http://localhost:9411/;
}

but when I enter this location in the browser it redirects me to another location / which is binded to another upstream

location / {
  proxy_pass http://localhost:4200/;
}

CodePudding user response:

I think this may help you

      location /zipkin {
          proxy_pass         http://localhost:9411;
          proxy_set_header    Host               $host;
          proxy_set_header    X-Real-IP          $remote_addr;
          proxy_set_header    X-Forwarded-For    $proxy_add_x_forwarded_for;
          proxy_set_header    X-Forwarded-Host   $host;
          proxy_set_header    X-Forwarded-Server $host;
          proxy_set_header    X-Forwarded-Port   $server_port;
          proxy_set_header    X-Forwarded-Proto  $scheme;
      }
  • Related