proxy pass with rewrite

Francis Daly francis at daoine.org
Fri Oct 25 08:01:19 UTC 2013


On Fri, Oct 25, 2013 at 07:57:01AM +0200, Philipp Kraus wrote:

Hi there,

> I would like to configure ngix with jenkins, nginx should be a proxy for the jenkins instance. I have configuration the proxy pass options in this way:
> 

https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
looks like it may have useful information.

> If I change the location to / everything works fine, but with the subdirectory alias I get an error with the URL. Jenkins result pages uses only
> URLs to http://mydomain/<jenkins part> but in my case it should be http://mydomain/jenkins/<jenkins data>

Fix jenkins so that it knows it is below /jenkins/, not below /.

> I must substitute all URL, which comes from the proxy_pass URL with http://mydomain/jenkins
> How can I do this in a correct way?

The best way in general is to arrange the back-end so that it doesn't
need doing.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list