You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keycloak JS and CSS is not loading with nGinx Reverse proxy context path #46018
I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
No response
Describe the bug
Hello,
Running keycloak latest version 26.5.2 behind nGinx reverse proxy using context path.
When we access the url https://test.example.com/kc the page only display this "Loading the Administration Console" with white background, JS and CSS is not loading throw 404 error.
Also, there seems to be a mismatch between the log and start-dev options shown in #46018 (comment) - the requests hitting the keycloak server have a context path of /kc, but start-dev is not configured to have an http-relative-path of /kc
/kc is define in the hostname parameter. I have also tried passing http-relative-path=/kc but that was giving the same 404 for JS and CSS .
@nshah14285 this should confirm that the problem is with the nginx configuration. If the 404 requests are not reaching the Keycloak server, then your issue is with the proxy configuration. For example try using curl or other client to issue the resource request directly to the Keycloak server - curl -v http://localhost:8080/kc/resources/...
Localhost request works but through nGinx reverse proxy using keycloak relative path /kc resources are not loading.
What could be the issue with nGinx config, any idea? I have already pasted the nginx config in this comment.
Activity
shawkins commentedon Feb 4, 2026
Seems similar to #45064
Please use http-access-log-enabled=true and http-access-log-pattern=long and provide the log of requests hitting the Keycloak server.
nshah14285 commentedon Feb 4, 2026
@shawkins
Keycloak command run as:
Below is the logs as requested.
shawkins commentedon Feb 4, 2026
@nshah14285 is that it? If so it would mean that the resource requests are not reaching the keycloak server.
Can you provide an example of a client side url that is producing a 404 and confirm whether that is even reaching the keycloak server?
nshah14285 commentedon Feb 4, 2026
@shawkins
It looks like https://domain/kc/ reaches to keycloak server but the resources JS & CSS is not loading.
Please find attached screenshot.
11 remaining items
keycloak-github-bot commentedon Feb 10, 2026
Thanks for reporting this issue, but there is insufficient information or lack of steps to reproduce.
Please provide additional details, otherwise this issue will be automatically closed within 14 days.
nshah14285 commentedon Feb 10, 2026
@shawkins
/kc is define in the hostname parameter. I have also tried passing http-relative-path=/kc but that was giving the same 404 for JS and CSS .
Keycloak command run as:
Below is the keycloak access log
nGinx access log
shawkins commentedon Feb 10, 2026
@nshah14285 this should confirm that the problem is with the nginx configuration. If the 404 requests are not reaching the Keycloak server, then your issue is with the proxy configuration. For example try using curl or other client to issue the resource request directly to the Keycloak server - curl -v http://localhost:8080/kc/resources/...
nshah14285 commentedon Feb 10, 2026
@shawkins
Localhost request works but through nGinx reverse proxy using keycloak relative path /kc resources are not loading.
What could be the issue with nGinx config, any idea? I have already pasted the nginx config in this comment.