Welcome! Log In Create A New Profile

Advanced

Help: Using Nginx Reverse Proxy bypass traffic in to a application running in a container

Amila Gunathilaka
May 17, 2021 10:00PM
>
> Hello All !


I have nginx installed on my linux host and* listen on http port 80* and I
want to bypass external traffic coming from external load balancer
(up-stream server) into my *nginx reverse proxy server (80 port) *and want
to bypass that http traffic into y application running in a docker
container (application host port 9091),

But my nginx configuration file didn't work as it always says *405 method
not allowed* error when request passing from nginx into the external load
balancer (up-stream server).

Is anyone familiar with this kind of problem? my nginx configuration file
is below.

http {
server {
listen 80 proxy_protocol;
#listen [::]:80 proxy_protocol;
server_name 172.25.234.105;
set_real_ip_from 172.25.234.2;
real_ip_header proxy_protocol;

location / {
proxy_pass http://127.0.0.1:9091;
#proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $proxy_protocol_addr;
proxy_set_header X-Forwarded-For $proxy_protocol_addr;
proxy_cache_bypass $http_upgrade;
auth_basic "PROMETHEUS PUSHGATEWAY Login Area";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
}

--
Amila
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Help: Using Nginx Reverse Proxy bypass traffic in to a application running in a container

Amila Gunathilaka May 17, 2021 10:00PM

Re: Help: Using Nginx Reverse Proxy bypass traffic in to a application running in a container

Francis Daly May 19, 2021 04:28AM

Re: Help: Using Nginx Reverse Proxy bypass traffic in to a application running in a container

amiladevops May 29, 2021 09:42AM

Re: Help: Using Nginx Reverse Proxy bypass traffic in to a application running in a container

Francis Daly June 01, 2021 02:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready