Thursday, November 21, 2019

Running KeyCloak behind Nginx rever-proxy

I have had some issues running KeyCloak 7.x in a docker container behind an Nginx reverse-proxy. Most of the standard stuff available as documentation for the various platforms works as-is. However, I could only get my configuration to work once I correctly used the KEYCLOAK_FRONTEND_URL environment variable. Essentially I had to set it as follows:

 KEYCLOAK_FRONTEND_URL: 'https://:{public-ip-address}:{public-https-port}'

Note: The important bit was writing the base url exactly as above. Ending it with a slash caused the prefixing to fail!

No comments: