0

I have no idea why after Jenkins is updated to version 1.642.4 (Ubuntu Server 15.04), the originally correctly set up reverse proxy now becomes broken. My current setting is exactly the same as said in Jenkins wiki:

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://localhost:9090/ nocanon
    ProxyPassReverse / http://localhost:9090/
    AllowEncodedSlashes NoDecode

    # Local reverse proxy authorization override
    # Most unix distribution deny proxy by default (ie /etc/apache2/mods-enable$
    <Proxy http://localhost:9090/*>
       Order deny,allow
       Allow from all
    </Proxy>
Michael
  • 780
  • 1
  • 10
  • 34
  • Resolved. Added properly URL in Jenkins Location settings – Michael Jun 15 '16 at 21:41
  • How ? What is the expected form of url ? – Aatif Akhter Jan 18 '17 at 12:00
  • `Manage Jenkins` > `Configure System` > find `Jenkins Location` and there is input `Jenkins URL`. Please add url. I added `http://jenkins.subdomain.com/` the same what I use in browser – Michael Jan 23 '17 at 10:45
  • Possible duplicate of [Why does Jenkins complain that my reverse proxy setup is broken?](https://stackoverflow.com/questions/27161854/why-does-jenkins-complain-that-my-reverse-proxy-setup-is-broken) – Parker Sep 12 '18 at 12:25

1 Answers1

0

Apache Configuration should have nocanon for ProxyPass. If SSL is enabled X-Forwarded-Proto and X-Forwarded-Port must be set.

ProxyPass               / http://localhost:8080/ nocanon
AllowEncodedSlashes     NoDecode
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"

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

org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
marayaa
  • 11
  • 2