Hi, I’ve installed kong with docker behind nginx reverse proxy and I don’t see the dashboard correctly
docker-compose.yml
kong:
image: kong/kong-gateway:2.8.1.4
container_name: kong
restart: always
healthcheck:
test: ["CMD", "kong", "health"]
interval: 10s
timeout: 10s
retries: 10
ports:
- 80:80
- 8002:8002
environment:
KONG_PROXY_LISTEN: 0.0.0.0:80, 0.0.0.0:443 ssl
KONG_ADMIN_LISTEN: 0.0.0.0:8001, 0.0.0.0:8444 ssl
KONG_ADMIN_GUI_URL: "http://localhost:8002"
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_ADMIN_ERROR_LOG: /dev/stderr
command: "kong start"
nginx configuration:
server {
listen 443 ssl;
server_name kong-dash.example.com;
ssl_certificate /etc/nginx/certs/crt.pem;
ssl_certificate_key /etc/nginx/certs/key.pem;
location / {
auth_basic "Admin area";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cookie_path / "/; secure; HttpOnly; SameSite=lax";
proxy_pass http://kong:8002/;
}
}
When i go to https://kong-dash.example.com
I see incomplete dashboard:
And into network section, it seems to make a call to port 8444, which of course, is unreachable from the browser:
I don’t understand if the problem is the configuration of nginx or kong
Thanks to anyone who wants to help me