# Keycloak(a.com) on JDK behind Apache Proxy(b.com)

**URL:** <https://forum.keycloak.org/t/keycloak-a-com-on-jdk-behind-apache-proxy-b-com/16346>\
**Category:** Getting advice\
**Created:** [July 6, 2022, 11:33pm UTC](https://forum.keycloak.org/t/keycloak-a-com-on-jdk-behind-apache-proxy-b-com/16346 "2022-07-06T23:33:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiny](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jiny](https://forum.keycloak.org/u/jiny)\
**Post date:** [July 6, 2022, 11:33pm UTC](https://forum.keycloak.org/t/keycloak-a-com-on-jdk-behind-apache-proxy-b-com/16346/1 "2022-07-06T23:33:35Z")

</div>

Hi,

Keycloak server ([a.com](http://a.com)) is in the indsie (company) DNS,  
and the proxy server is in both inside and outside DNS.

Proxy server is set to redirect depending on the path after the domain:

- [b.com/aaa/](http://b.com/aaa/)… =\> [c.com/aaa/](http://c.com/aaa/)…
- [b.com/bbb/](http://b.com/bbb/) =\> [d.com/xvz/](http://d.com/xvz/)…
- [b.com/realms/](http://b.com/realms/) =\> [a.com/realms/](http://a.com/realms/) _# This is the one I added now_

The other proxies work fine; it correctly redirects to the servers behind.  
But for keycloak, it shows “We are sorry Page Not Found” w/o any css (white backgroud w/ black letters)

> **Keyclaok Log [[a.com](http://a.com)]**  
> 2022-07-04 18:49:07,522 DEBUG [io.quarkus.vertx.http.runtime.ForwardedParser] (executor-thread-1) Recalculated absoluteURI to [https://a.com/realms/TEST/protocol/saml/descriptor](https://a.com/realms/TEST/protocol/saml/descriptor)  
> 2022-07-04 18:49:07,525 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (executor-thread-1) JtaTransactionWrapper commit  
> 2022-07-04 18:49:07,525 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (executor-thread-1) JtaTransactionWrapper end  
> 2022-07-04 18:49:09,507 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) new JtaTransactionWrapper  
> 2022-07-04 18:49:09,507 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) was existing? false  
> 2022-07-04 18:49:09,507 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) JtaTransactionWrapper commit

> **Keyclaok Log [[b.com](http://b.com) \> [a.com](http://a.com)]**  
> 2022-07-04 18:49:35,072 DEBUG [io.quarkus.vertx.http.runtime.ForwardedParser] (executor-thread-1) Recalculated absoluteURI to [https://b.com/realms//TEST/protocol/saml/descriptor](https://b.com/realms//TEST/protocol/saml/descriptor)  
> 2022-07-04 18:49:35,072 DEBUG [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-1) Error response 404: javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource for full path: [https://b.com/realms//TEST/protocol/saml/descriptor](https://b.com/realms//TEST/protocol/saml/descriptor)  
> at org.jboss.resteasy.core.registry.SegmentNode.match(SegmentNode.java:152)  
> at org.jboss.resteasy.core.registry.RootNode.match(RootNode.java:74)  
> at org.jboss.resteasy.core.registry.RootClassNode.match(RootClassNode.java:47)  
> at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:480)  
> at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:332)  
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:253)  
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)  
> at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)  
> at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)  
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)  
> at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)  
> at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)  
> at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:82)  
> at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:42)  
> at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)  
> at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)  
> at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)  
> at io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:67)  
> at io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:55)  
> at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)  
> at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)  
> at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)  
> at io.quarkus.vertx.http.runtime.VertxHttpRecorder$5.handle(VertxHttpRecorder.java:380)  
> at io.quarkus.vertx.http.runtime.VertxHttpRecorder$5.handle(VertxHttpRecorder.java:358)  
> at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)  
> at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)  
> at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)  
> at org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter.lambda$createBlockingHandler$1(QuarkusRequestFilter.java:71)  
> at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)  
> at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)  
> at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)  
> at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)  
> at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)  
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)  
> at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)  
> at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)  
> at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)  
> at java.base/java.lang.Thread.run(Thread.java:829)

> **keycloak.conf**  
> https-certificate-file=/…/cert.pem  
> https-certificate-key-file=/…/key.pem  
> proxy=passthrough _#tried “reencrypt” and “edge” too but nothing worked_  
> proxy\_address\_forwarding=true  
> [hostname=a.com](http://hostname=a.com)  
> http-port=80  
> https-port=443  
> https-protocols=TLSv1.3,TLSv1.2  
> http-enabled=true  
> hostname-strict=false  
> hostname-strict-https=false

> **/etc/hosts**  
> 127.0.0.1 [a.com](http://a.com)  
> ::1 [a.com](http://a.com)

What else can I try?

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [July 7, 2022, 11:31pm UTC](https://forum.keycloak.org/t/keycloak-a-com-on-jdk-behind-apache-proxy-b-com/16346/2 "2022-07-07T23:31:11Z")

</div>

Keycloak is getting an extra `/` from you proxy

> [@jiny](#):
>
> [https://b.com/realms//TEST/protocol/saml/descriptor](https://b.com/realms//TEST/protocol/saml/descriptor)

It doesn’t ignore it, it’s a bit stricter.

---

<div class="post-metadata">

**Author:** ![jiny](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jiny](https://forum.keycloak.org/u/jiny)\
**Post date:** [July 7, 2022, 11:34pm UTC](https://forum.keycloak.org/t/keycloak-a-com-on-jdk-behind-apache-proxy-b-com/16346/3 "2022-07-07T23:34:14Z")

</div>

Oh my gosh thank you so much for pointing it out!!!  
I never realized it!  
Thank you!!!
