Ask Your Question
0

How can Keycloak be used behind an NGINX proxy?

asked 2023-01-26 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-08-31 14:00:00 +0000

lalupa gravatar image

To use Keycloak behind an NGINX proxy, you should follow the below steps:

  1. Configure Keycloak to use HTTPS (SSL/TLS).

  2. Create an NGINX server block for your Keycloak installation.

  3. Configure the proxy_pass directive to forward requests to Keycloak.

  4. Set up NGINX to handle SSL/TLS.

  5. Ensure that the following headers are passed to Keycloak by adding them to your NGINX configuration: Host, X-Forwarded-For, X-Forwarded-Proto.

  6. Set a specific cookie domain to ensure that the cookie is shared between NGINX and Keycloak.

  7. Lastly, restart NGINX and Keycloak.

These steps will help you use Keycloak behind an NGINX proxy.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-01-26 11:00:00 +0000

Seen: 11 times

Last updated: Aug 31 '21