简体   繁体   中英

How to setup NGINX as a reverse proxy on ports 8443, 8444, and 8445 to upstream app 8080

I am trying to configure NGINX as a reverse proxy/sidecar in AWS EKS.

The NGINX proxy should allow traffic on ports 8443, 8444, & 8445 to the upstream app that displays a static webpage on 8080.

So stated another way; If I import POD_IP:8443, POD_IP:8444, POD_IP:8445, I will always be directed to the upstream app that displays a static webpage as of right now. I can currently import POD_IP:8080 and go directly to the app, however when I import POD_IP:8443, I am presented with an NGINX 404 page, and POD_IP:8444 and POD_IP:8445 time out.

There are some complications with how exactly NGINX is deployed, in my case its deployed via a Helm chart through a Jenkins pipeline.

I don't want to complicate the question ask too much, as I don't think all the nitty gritty details are necessary but I can provide them if required.

I tried changing some of the NGINX directives a few different times but haven't been able to get the desired result.

A colleague edited security groups so there should be no restrictions in that manner.

Couple of things here:

  1. your k8s service that's sending traffic to nginx should expose all these ports.
  2. nginx config should allow traffic on all the mentioned ports, you should have listen statement for all these ports.
  3. Have proxy_pass statement to proxy traffic to your application on port 8080.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM