<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Can anyone help me with this?</div><div class=""><br class=""></div><div class="">When I use virtualhost configuration it doesn’t work, when I disable virtualhost everything is fine.</div><div class=""><br class=""></div><div class="">I tried every possible combination that I can think off, but still isn’t working.</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 21, 2015, at 11:58 PM, Marko Radinovic &lt;<a href="mailto:markoradinovic79@gmail.com" class="">markoradinovic79@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class="">I tried without proxy server, but it’s not working.&nbsp;</div><div class=""><br class=""></div><div class="">When I navigate to admin console</div><div class=""><br class=""></div><div class=""><a href="http://accounts.e-karton.net:8081/admin/maste/console" class="">http://accounts.e-karton.net:8081/admin/maste/console</a></div><div class=""><br class=""></div><div class="">I’m redirected to&nbsp;</div><div class=""><a href="http://accounts.e-karton.net:8081//realms/master/tokens/login?client_id=security-admin-console&amp;redirect_uri=http://accounts.e-karton.net:8081/admin/master/console/&amp;state=1e8dc6f1-b49f-4cce-8cc4-59233caafbb2&amp;response_type=code" class="">http://accounts.e-karton.net:8081//realms/master/tokens/login?client_id=security-admin-console&amp;redirect_uri=http%3A%2F%2Faccounts.e-karton.net%3A8081%2Fadmin%2Fmaster%2Fconsole%2F&amp;state=1e8dc6f1-b49f-4cce-8cc4-59233caafbb2&amp;response_type=code</a></div><div class=""><br class=""></div><div class="">Redirect url is invalid&nbsp;because of appended “/“. Now I’m getting this in log:</div><div class=""><br class=""></div><div class="">2015-01-21 15:07:32,193 WARN &nbsp;[org.jboss.resteasy.core.ExceptionHandler] (default task-63) failed to execute: javax.ws.rs.NotFoundException: Could not find resource for full path:&nbsp;<a href="http://accounts.e-karton.net:8081//realms/master/tokens/login?client_id=security-admin-console&amp;redirect_uri=http://accounts.e-karton.net:8081/admin/master/console/&amp;state=1e8dc6f1-b49f-4cce-8cc4-59233caafbb2&amp;response_type=code" class="">http://accounts.e-karton.net:8081//realms/master/tokens/login?client_id=security-admin-console&amp;redirect_uri=http%3A%2F%2Faccounts.e-karton.net%3A8081%2Fadmin%2Fmaster%2Fconsole%2F&amp;state=1e8dc6f1-b49f-4cce-8cc4-59233caafbb2&amp;response_type=code</a></div><div class=""><br class=""></div><div class="">The same thing is happening when using proxy server, but there is nothing in log file.</div><div class=""><br class=""></div><div class="">How can I prevent this?</div><div class=""><br class=""></div><div class="">Thank you.</div><div class=""><br class=""></div><div style="" class=""><blockquote type="cite" class=""><div class="">On Jan 21, 2015, at 7:17 AM, Stian Thorgersen &lt;<a href="mailto:stian@redhat.com" class="">stian@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">Does it work if you bypass the proxy?<br class=""><br class="">----- Original Message -----<br class=""><blockquote type="cite" class="">From: "Marko Radinovic" &lt;<a href="mailto:markoradinovic79@gmail.com" class="">markoradinovic79@gmail.com</a>&gt;<br class="">To: <a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class="">Sent: Tuesday, 20 January, 2015 8:17:41 PM<br class="">Subject: [keycloak-user] Always redirected to login form<br class=""><br class="">Hi,<br class="">When I try to login to master realm, I’am redirected back to login page.<br class=""><br class="">I’m using:<br class="">Wildfly 8.2.0.Final<br class="">Keycloak version 1.1.0-Beta2<br class="">Apache2 as proxy server.<br class=""><br class="">Here is my apache configuration<br class=""><br class="">IfModule mod_ssl.c&gt;<br class="">&lt;VirtualHost _default_:443&gt;<br class="">ServerName <a href="http://accounts.e-karton.net/" class="">accounts.e-karton.net</a><br class=""><br class="">ErrorLog ${APACHE_LOG_DIR}/ <a href="http://accounts.e-karton.net/" class="">accounts.e-karton.net</a> -error.log<br class="">CustomLog ${APACHE_LOG_DIR}/ <a href="http://accounts.e-karton.net/" class="">accounts.e-karton.net</a> -access.log combined<br class=""><br class="">SSLEngine on<br class="">SSLProtocol all -SSLv2<br class="">SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM<br class=""><br class="">…SSL stuff omitted<br class=""><br class=""><br class="">BrowserMatch "MSIE [2-6]" \<br class="">nokeepalive ssl-unclean-shutdown \<br class="">downgrade-1.0 force-response-1.0<br class=""># MSIE 7 and newer should be able to use keepalive<br class="">BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown<br class=""><br class=""><br class="">SetOutputFilter DEFLATE<br class="">SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|ico|png)$ \ no-gzip dont-vary<br class="">SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ \no-gzip dont-vary<br class="">SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|ico|png)$ \ no-gzip dont-vary<br class="">SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ \no-gzip dont-vary<br class="">SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary<br class=""><br class="">BrowserMatch ^Mozilla/4 gzip-only-text/html<br class="">BrowserMatch ^Mozilla/4\.0[678] no-gzip<br class="">BrowserMatch \bMSIE !no-gzip !gzip-only-text/htmles<br class=""><br class=""># Turn off support for true Proxy behaviour as we are acting as<br class=""># a transparent proxy<br class="">ProxyRequests Off<br class=""><br class=""># Turn off VIA header as we know where the requests are proxied<br class="">ProxyVia Off<br class="">ProxyPreserveHost On<br class="">RequestHeader set X-Forwarded-Proto "https"<br class="">SSLProxyEngine on<br class="">&lt;Proxy *&gt;<br class="">AddDefaultCharset Off<br class="">Order deny,allow<br class="">Allow from all<br class="">&lt;/Proxy&gt;<br class=""><br class=""><br class="">ProxyPass / <a href="ajp://192.168.5.17:8009/" class="">ajp://192.168.5.17:8009/</a><br class="">ProxyPassReverse / <a href="ajp://192.168.5.17:8009/" class="">ajp://192.168.5.17:8009/</a><br class="">&lt;/VirtualHost&gt;<br class="">&lt;/IfModule&gt;<br class=""><br class=""><br class="">Wildfly configuration:<br class=""><br class="">&lt;subsystem xmlns="urn:jboss:domain:undertow:1.2"&gt;<br class="">&lt;buffer-cache name="default"/&gt;<br class="">&lt;server name="default-server"&gt;<br class="">&lt;ajp-listener name="ajp" scheme="https" socket-binding="ajp"/&gt;<br class="">&lt;http-listener name="default" certificate-forwarding="true"<br class="">socket-binding="http" proxy-address-forwarding="true"/&gt;<br class="">&lt;host name="default-host" alias="localhost"&gt;<br class="">&lt;location name="/" handler="welcome-content"/&gt;<br class="">&lt;filter-ref name="server-header"/&gt;<br class="">&lt;filter-ref name="x-powered-by-header"/&gt;<br class="">&lt;/host&gt;<br class="">&lt;host name="accounts" alias=" <a href="http://accounts.e-karton.net/" class="">accounts.e-karton.net</a> "<br class="">default-web-module="auth-server.war"/&gt;<br class="">&lt;/server&gt;<br class="">&lt;servlet-container name="default"&gt;<br class="">&lt;jsp-config/&gt;<br class="">&lt;websockets/&gt;<br class="">&lt;/servlet-container&gt;<br class="">&lt;handlers&gt;<br class="">&lt;file name="welcome-content" path="${jboss.home.dir}/welcome-content"/&gt;<br class="">&lt;/handlers&gt;<br class="">&lt;filters&gt;<br class="">&lt;response-header name="server-header" header-name="Server"<br class="">header-value="WildFly/8"/&gt;<br class="">&lt;response-header name="x-powered-by-header" header-name="X-Powered-By"<br class="">header-value="Undertow/1"/&gt;<br class="">&lt;/filters&gt;<br class="">&lt;/subsystem&gt;<br class=""><br class="">Keycloak jboss-web.xml<br class=""><br class="">&lt;?xml version="1.0"?&gt;<br class="">&lt;!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "<br class=""><a href="http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd" class="">http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd</a> "&gt;<br class="">&lt;jboss-web&gt;<br class="">&lt;context-root&gt;/&lt;/context-root&gt;<br class="">&lt;virtual-host&gt;accounts&lt;/virtual-host&gt;<br class="">&lt;/jboss-web&gt;<br class=""><br class="">Can anyone help me with this?<br class=""><br class="">_______________________________________________<br class="">keycloak-user mailing list<br class=""><a href="mailto:keycloak-user@lists.jboss.org" class="">keycloak-user@lists.jboss.org</a><br class=""><a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" class="">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br class=""></blockquote></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></body></html>