title: configure nginx reverse proxy inside docker container
body: <p>I have a docker contaniner running on a Debian Virtual machine. The docker container respond locally to <a href="http://192.168.1.5" rel="nofollow noreferrer">http://192.168.1.5</a>.</p>
  <p>In the same Debian Virtual machine I added nginx reverse proxy:</p>
  <pre><code>version: '3'
  
  services:
    webserver:
      image: nginx:latest
      container_name: nginx
      ports:
        - 80:80
        - 443:443
      restart: always
      volumes:
        - ./nginx/nginx.conf:/etc/nginx/nginx.conf
  
  </code></pre>
  <p>this is my conf file:</p>
  <pre><code>#/etc/nginx/nginx.conf
  
  events {
      worker_connections  1024;
  }
  
  http {
     
   server {
  
          listen 80;
  
          server_name spa.ddns.net;
  
          location /ha {
  
              proxy_pass http://192.168.1.5:8123;
  
          }
      }
  }
  
  </code></pre>
  <p>I want access from internet to <a href="http://192.168.1.5:8123" rel="nofollow noreferrer">http://192.168.1.5:8123</a>, the port forwarding and the firewall routes are ok, I have try an other web server on my LAN and it works ( <code>python3 -m http.server 80</code> )</p>
  <p>If I try to connect via browser nothing happens. If I try with curl he say &quot;not found&quot;</p>
  <pre><code>$ curl http://spa.ddns.net/ha
  404: Not Found%  
  </code></pre>