Kong Nginx Config Unreachable issue #14707
Unanswered
Mohamed-Abdulla
asked this question in
Help
Replies: 1 comment
-
You may need to expose the port on the host, since Nginx is running on the host. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks 👋,
I’m new to Kong and recently set it up using the official Docker Compose setup. Everything works fine locally, including accessing Kong Manager via localhost:8002.
However, I’m having trouble exposing the Kong Manager UI through Nginx on my host machine. Here’s my setup:
• Kong runs in Docker (compose-kong-1)
• Nginx runs on the host machine
• localhost:8002 works inside the container
• But accessing https://manager-kong.abc.com (proxy to localhost:8002) throws a 111: Connection refused error
Nginx Config
server {
listen 80;
server_name api-kong.abc.com manager-kong.abc.com;
return 301 https://$host$request_uri;
}
Kong Proxy
server {
listen 443 ssl;
server_name api-kong.abc.com;
}
Kong Manager
server {
listen 443 ssl;
server_name manager-kong.abc.com;
}
Nginx Error Log
connect() failed (111: Connection refused) while connecting to upstream,
upstream: "http://127.0.0.1:8002/"
What I’ve Tried
• Verified localhost:8002 works inside the container, but not on the host
• Added KONG_MANAGER_LISTEN: "0.0.0.0:8002" in env for kong service
• Restarted containers and nginx
Question
Since Nginx is running on the host and Kong is in Docker, should I proxy to the container’s IP or expose port 8002 differently?
Any help would be appreciated! 🙏
Beta Was this translation helpful? Give feedback.
All reactions