Jenkins behind Apache Web Server
I've spent the entire day trying to work out what my mod_rewrite rules should be for putting Jenkins behind Apache.
I want to be able to access Jenkins via ci.mydomain.com . My current config allows me to access Jenkins however some resources are not loaded (for example the background image, and the New Job Link)
The problem is that an extra jenkins is being put into the URL. ie http://mydomain.com/jenkins/view/All/newJob where it should read http://mydomain.com/view/All/newJob
my config is as follows:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydom开发者_开发技巧ain\.com\.$ [NC]
RewriteCond %{REQUEST_URI} ^/jenkins/ [NC]
RewriteRule (.*) http://mydomain.co/$1 [L,R=301]
Could somebody please correct the error of my ways...
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^jenkins/(.*)$ http://mydomain.co/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^/jenkins/(.*)$ $1 [L,R=301]
精彩评论