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

Amila Gunathilaka amila.kdam at
Tue May 18 01:59:20 UTC 2021

> 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;
real_ip_header proxy_protocol;

        location / {
   #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;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list