nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 321 forks source link

Bug: Proxy validation #1234

Open Pavlusha311245 opened 2 months ago

Pavlusha311245 commented 2 months ago

Nginx Unit version: 1.32.1

Validation error when setting action proxy. http://host.docker.internal:7600 fails verification

Config inside my docker container:

I tried to use this inside a container to communicate with the host, but there is no way to simply load it :)

{
  "listeners": {
    "*:80": {
      "pass": "routes/test"
    },
  },
  "routes": {
    "test": [
      {
        "action": {
          "proxy": "http://host.docker.internal:7600"
        }
      }
    ],
  }
}

Error:

{
        "error": "Invalid configuration.",
        "detail": "The \"proxy\" address is invalid \"host.docker.internal:7600\""
}
andrey-zelenkov commented 2 months ago

Hi @Pavlusha311245,

Unit doesn't support DNS resolving at the moment. More information here: https://github.com/nginx/unit/issues/779

Pavlusha311245 commented 2 months ago

Hi @Pavlusha311245,

Unit doesn't support DNS resolving at the moment. More information here: #779

Have Unit same problem with upstreams?

andrey-zelenkov commented 2 months ago

Have Unit same problem with upstreams?

Yes, no resolving anywhere.

Pavlusha311245 commented 1 month ago

@andrey-zelenkov I found new situation. Why I'm getting an error while using http://172.24.0.3 instead of http://172.24.0.3:80?

andrey-zelenkov commented 1 month ago

There is currently no default port specified.