title: Nginx Proxy Manager: Connection refused when forwarding to Docker container of same Docker network
body: <p>Connections over my reverse proxy manager (Nginx Proxy Manager) to a docker container of the same docker network are refused. I just can't figure out why the connections are refused. I feel like the fix is simple. I hope you can help me out.</p>
  <p>Here is my log and setup:</p>
  <p><strong>when trying to access:</strong> (on both http and https)</p>
  <p><img src="https://user-images.githubusercontent.com/5825645/95498147-af484380-09a3-11eb-8612-83151e52a811.png" alt="grafik" /></p>
  <p><strong>from the error log:</strong></p>
  <pre><code>2020/10/08 18:03:02 [error] 269#269: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: ***.duckdns.org, request: &quot;GET / HTTP/1.1&quot;, upstream: &quot;http://172.19.0.3:80/&quot;, host: &quot;***.duckdns.org&quot;
  2020/10/08 18:03:03 [error] 269#269: *8 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: ***.duckdns.org, request: &quot;GET / HTTP/2.0&quot;, upstream: &quot;http://172.19.0.3:80/&quot;, host: &quot;***.duckdns.org&quot;
  </code></pre>
  <p><strong>docker-compose.yml:</strong></p>
  <pre><code>version: &quot;3.7&quot;
  
  services: 
    jetty:
      container_name: jetty
      image: jetty:9
      ports:
        - '80'
      volumes:
        - './jetty/webapps:/var/lib/jetty/webapps'
    # for reverse proxy
    nginx-pm:
      container_name: nginx-pm
      image: jc21/nginx-proxy-manager:2
      restart: always
      ports:
      - 80:80 # Public HTTP Port
      - 443:443 # Public HTTPS Port:
      - 81:81 # Admin Web Port:
      volumes:
      - ./nginx-proxy-manager/config.json:/app/config/production.json
      - ./nginx-proxy-manager/data:/data
      - ./nginx-proxy-manager/letsencrypt:/etc/letsencrypt
  </code></pre>
  <p><strong>proxy host setting:</strong></p>
  <p><img src="https://user-images.githubusercontent.com/5825645/95497864-48c32580-09a3-11eb-95d0-a7d34cd1d2c6.png" alt="grafik" /></p>