I have an apache server sitting between a Jenkins server running on and the client browser.

I am giving in the browser and expecting the Jenkins to be redirected to page but instead, I am redirected to page.

In the apache httpd.conf I tried giving the ProxyPass and ProxyPassReverse

LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_module modules/mod_proxy.so
ProxyPass /jenkins
ProxyPassReverse /jenkins

From what I understand about ProxyPassReserve is that it would rewrite the response header with /jenkins/login so that when the browser sends the redirected request again it would be

Not sure if my understanding is correct or is there something I am missing?

1 Answer 1


Try to add also:

ProxyPassReverse /jenkins

Probably on the ProxyPass you are maintaining the original host header (ProxyPreserveHost On), if so with this ProxyPassReverse probably will do the trick for you.


I've checked on my mini lab and the point is jenkins is not doing a redirection but it is giving you this html

<meta http-equiv='refresh' content='1;url=/login?from=%2F'/>

I solved it starting jenkins with switch --prefix=/jenkins

  • This is not working.
    – tintin
    Feb 28, 2017 at 20:11
  • @tintin I've edited and changed the way to start jenkins (if possible for you) Mar 1, 2017 at 6:10
  • I am starting jenkins as a service, so the prefix is getting ignored sudo service jenkins start --prefix=/jenkins Is there any way to pass the param?
    – tintin
    Mar 2, 2017 at 7:21
  • Which OS? If RedHat/CentOS probably you have some files on /etc/sysconfig directory which allows you to change parameters for jenkins. Mar 3, 2017 at 7:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .