I installed keycloak following this guide I can access it using http://pu.bl.ic.ip:8082
Now, I put it behind nginx with the following conf:
server {
if ($host = keycloak.mydomain.com) {
return 301 https://$host:$request_uri;
}
listen 80;
listen [::]:80;
server_name keycloak.mydomain.com;
return 404;
}
server {
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/keycloak.mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/keycloak.mydomain.com/privkey.pem; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
server_name keycloak.mydomain.com;
access_log /var/log/nginx/keycloak-access.log;
error_log /var/log/nginx/keycloak-error.log;
location / {
proxy_pass http://127.0.0.1:8082;
}
}
I can access it at https://keycloak.mydomain.com
The problem is the the link on the webpage use 127.0.0.1:8082 as baseurl. How do I use keycloak.mydomain.com instead ?