Jenkins / Apache Reverse Proxy Error Jenkins / Apache Reverse Proxy Error jenkins jenkins

Jenkins / Apache Reverse Proxy Error


I know this is an old question, but I was having the same problem with the error:

HTTP ERROR 404Problem accessing /administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/testForReverseProxySetup/https%3A%2F%2Fbuild.scopeitconsulting.com%2Fmanage/. Reason:http://build.domain.com/manage vs. https://build.domain.com/manage

I was able to solve my problem by including the two lines from the author's question:

RequestHeader set X-Forwarded-Proto "https"RequestHeader set X-Forwarded-Port "443"

So here is my relevant section from a working ssl.conf configuration in case it helps anybody. I am running Jenkins on port 8080 at the root context with http but reverse proxying it behind Apache enforcing https.

ProxyPass               / http://localhost:8080/ nocanonProxyPassReverse        / http://localhost:8080/ProxyPassReverse        / http://build.domain.com/ProxyPassReverse        / https://build.domain.com/ProxyRequests           OffProxyPreserveHost       OnAllowEncodedSlashes     NoDecodeRequestHeader set X-Forwarded-Proto "https"RequestHeader set X-Forwarded-Port "443"<Proxy http://localhost:8080/> Order deny,allow Allow from all</Proxy>

I hope this helps somebody who like me has spent way too much time trying to find a working configuration to resolve the error.


You need to add below to catalina.properties file. Updating Apache configuration itself is not sufficient.

org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true