Apache2 & Jenkins & SSL

$JAVA_HOME/bin/java -DJENKINS_HOME=/var/lib/jenkins -Xms=512m -Djava.awt.headless=true -server -jar /var/lib/jenkins.war --httpPort=8080 --httpListenAddress= --ajp13Port=-1 --logfile=/var/log/jenkins.log
<VirtualHost *:443>
  ServerAdmin admin@example.com
  DocumentRoot "/srv/www/"
  ServerName jenkins.example.com

  SSLEngine On
  SSLVerifyClient none
  SSLVerifyDepth 3
  SSLCertificateFile /etc/ssl/example.crt
  SSLCertificateKeyFile /etc/ssl/example.key

  ProxyRequests Off
  ProxyPreserveHost On

    Order deny,allow
    Allow from all

  ProxyPass /
  ProxyPassReverse /

  <Location />
    Order allow,deny
    Allow from all
    AuthType basic
    AuthName Build
    AuthUserFile /etc/apache2/jenkins-http.user
    Require vaild-user

  Header edit Location ^http://jenkins.server/ https://jenkins.server/

Note: Jenkins with AJP and SSL via Apache was not working…maybe a bug?

Leave a Reply

Your email address will not be published. Required fields are marked *