[keycloak-user] nginx with a reverse proxy to keycloak server

Juan Diego juandiego83 at gmail.com
Mon Apr 4 23:06:14 EDT 2016


Hi,

I installed keycloak on a wildfly 10 server, I bought an installed the a
certificate.  Everything seems to work accesing
https://mydomain.com:8443/auth/

My problem comes with my reverse proxy.  I have other apps inside that
wildfly, and they have their own domain and they work perfectly with the
reverse proxy I set on.

When I access https://mydomain.com, i can see the first page of keycloak
but none of the images work,the links are broken.


Should I enable something on my keycloak so it can work.

This is my block

upstream wildfly {
  server 127.0.0.1:8443 fail_timeout=0;
}


server {
       listen         80;
       server_name    mydomain.com;
       return         301 https://$server_name$request_uri;
}


server {
    listen 443 ssl;
    server_name  mydomain.com;

    ssl on;
    ssl_certificate
/opt/wildfly/standalone/configuration/rrec/mydomain.com.crt;
    ssl_certificate_key
/opt/wildfly/standalone/configuration/rrec/mydomain.com.rsa.key;
    access_log /var/log/nginx/mydomain.com-access.log;
    error_log /var/log/nginx/mydomain.com-error.log;


    location = / {
        return 301 https://mydomain.com/auth;
    }


    location /auth {
        proxy_pass https://127.0.0.1:8443/auth/;
        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;
        proxy_set_header X-Forwarded-Port   443;
    }

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160404/c05667ba/attachment.html 


More information about the keycloak-user mailing list