Reputation:
Unable to load admin console. I have setup Nginx confif
Upvotes: 1
Views: 4708
Reputation: 3392
As described in the documentation
nginx needs to provide X-Fordward-For
and X-Forwarded-Proto
Header when acting as ssl proxy for keycloak
e.g like that
location /
{
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Access-Control-Allow-Origin *;
proxy_pass http://keycloak;
}
And you need to configure proxy adress forwarding in keycloak. Either by adding proxy-address-forwarding="true"
to http-listener
in the standalone.xml
or by setting the environment variable PROXY_ADDRESS_FORWARDING: "true"
when using docker.
And finally, in case I'm allowed to give you an avdice: If you ask more specific/detailed questions you will get better answers. A screenshot with an error message and the info you "have a nginx" is normally not enough. Posting your full configuration is essential to provide you useful help.
Upvotes: 4