Pages

Monday, June 23, 2014

Running Jenkins to work with Apache on Port 80

Tested on Centos 6 and Jenkins installed with RPM from jenkins-1.527-1.1.noarch

Change the /etc/sysconfig/jenkins with right JENKINS_ARGS

#JENKINS_ARGS="--prefix=/jenkins"  #If you wanna run like http://localhost
JENKINS_ARGS=""  # if you wanna run Jenkins on the index


[root@tiber07 jenkins]# cat /etc/httpd/conf.d/jenkins.conf
<VirtualHost *:80>
    ProxyPass         /jenkins  http://localhost:8080/
    ProxyPassReverse  /jenkins  http://localhost:8080/
    ProxyRequests     Off
    ProxyPreserveHost On
    <Proxy http://localhost:8080/*>
        Order deny,allow
        Allow from all
    </Proxy>
    RewriteEngine on
    RewriteRule   ^/jenkins/(.+) http://%{HTTP_HOST}/$1
</VirtualHost>


#Make sure to change the Proxy Pass location depending what u defined in JENKINS_ARGS

No comments:

Post a Comment