Repository navigation
Admin console context path issues behind rewriting nginx proxy using --hostname-path (env KC_HOSTNAME_PATH) #11546
Unanswered
poconnor-lab49
asked this question in
Q&A
Replies: 1 comment 4 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.
We're trying to migrate from Keycloak 16.1.1 to 17.x and are having some issues reaching the admin console.
The initial request works, but all the subsequent requests fail with a 404 since they don't seem to use the context path. For example, https://example.com/auth-test loads the "Welcome to Keycloak" HTML, but the next request to https://example.com/resources/5zn7g/common/keycloak/node_modules/patternfly/dist/css/patternfly.css which returns a 404.
We're building a custom image with no environment variable overrides except
KC_METRICS_ENABLE=trueandKC_DB=postgres. I don't think I should need to set--http-relative-pathorKC_HTTP_RELATIVE_PATHsince nginx is handling the routing and is rewriting/auth-test(/|$)(.*)to/$2.Keycloak is deployed with environment variables like
KC_PROXY: edge KC_DB: postgres KC_DB_URL_HOST: keycloak-test-db-postgresql KC_DB_URL_PORT: 5432 KC_METRICS_ENABLED: true KC_HOSTNAME: example.com KC_HOSTNAME_PATH: auth-test KC_HOSTNAME_STRICT: false KC_HOSTNAME_STRICT_HTTPS: false KC_HTTP_ENABLED: trueIf I navigate directly to
https://example.com/auth-test/admin/the interface loads correctly, but all the links are still broken.Navigating to
https://example.com/auth-test/realms/master/account/#/loads a broken page, but theSign inbutton works.Am I using this wrong, or is there some other environment variable I should be using instead? Do I need to set a quarkus property directly?
The reason I'm asking is I want to be able to deploy multiple keycloak instances behind the same proxy at different paths so that I can keep a stable instance running for developers while I test changes.
All reactions