Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1522

How to enabling HTTPS for keycloak behind nginx

$
0
0

I’m running Keycloak in a Docker container and have set up an Nginx reverse proxy to make it accessible at docsbot.agency. My current setup allows access via HTTP, but I need to enable HTTPS using an SSL certificate I have for the domain.

Currently, I launch Keycloak with the following command:

sudo docker run -d -p 8000:8080 \    -e KC_BOOTSTRAP_ADMIN_USERNAME=admin \    -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \    quay.io/keycloak/keycloak:26.0.7 start-dev

My Nginx configuration is as follows:

server {    listen 80;    server_name docsbot.agency;    location / {        proxy_pass http://127.0.0.1:8000;        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;    }}

How can I modify my setup to correctly enable HTTPS? Should I configure Keycloak differently, or should I handle it entirely through Nginx?

Any guidance would be much appreciated!


Viewing all articles
Browse latest Browse all 1522

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>