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

Stian Thorgersen sthorger at redhat.com
Tue Apr 5 00:53:15 EDT 2016


Did you follow the steps in
http://keycloak.github.io/docs/userguide/keycloak-server/html/server-installation.html#d4e403
?

On 5 April 2016 at 05:06, Juan Diego <juandiego83 at gmail.com> wrote:

> 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;
>     }
>
> }
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160405/e195d4a3/attachment-0001.html 


More information about the keycloak-user mailing list