title: Lookup on 192.168.65.5:53: no such host
body: <p>I try to run nginx in docker and connect it to one service in docker as well. Another service is running without docker and use this nginx too. My docker-compose:</p>
  <pre><code>version: &quot;3.9&quot;
  
  services:
    nginx:
      restart: always
      image: nginx
      volumes:
        - ./config/nginx.conf:/etc/nginx/nginx.conf:ro
      ports:
        - &quot;3000:80&quot;
        - &quot;9000:81&quot;
  
    web:
      restart: always
      image: &quot;xxxx/xxxx/web&quot;
  </code></pre>
  <p>And nginx conf at <code>./config/nginx.conf</code>:</p>
  <pre><code>events {}
  
  http{
      upstream ws-api {
          server host.docker.internal:8081;
      }
  
      upstream ws-web {
          server web;
      }
  
  
  
      server {
          server_name localhost;
          listen      80;
       
          location / {
              include fastcgi_params;
              fastcgi_split_path_info ^(/)(.*)$;
              fastcgi_param PATH_INFO $fastcgi_path_info;
              fastcgi_param SCRIPT_NAME $fastcgi_script_name;
              fastcgi_pass  ws-api;
          }
      }
  
      server {
          server_name localhost;
          listen      81;
       
          location / {
              include fastcgi_params;
              proxy_pass http://ws-web;
          }
  
          location /api {
              rewrite        ^([^.]*[^/])$ $1/;
              rewrite        ^/api(.*)$ $1 break;
  
              include fastcgi_params;
              fastcgi_split_path_info ^(/)(.*)$;
              fastcgi_param PATH_INFO $fastcgi_path_info;
              fastcgi_param SCRIPT_NAME $fastcgi_script_name;
              fastcgi_pass  ws-api;
          }
      }
  }
  </code></pre>
  <p>When I open localhost:9000 I get the error message:</p>
  <blockquote>
  <p>lookup ws-web on 192.168.65.5:53: no such host</p>
  </blockquote>
  <p>localhost:3000 works fine</p>
  <p>What is my mistake?</p>