0

I just "yum install jenkins" and ran to war file.

Now the jenkins server is accessible via "x.x.x.x:8080";

How do I route all the traffic via SSL/TLS with self-generate certs?

I've looked at previous articles regarding Jenkins on https but didn't find any of them applicable.

Please help, thanks.

  • Put a web server in front or serve TLS directly from the java process. Check the usual places for configuration (`/etc/jenkins`, `/etc/sysconfig/jenkins`). I can't recall if the RPM uses `java -jar` and not a WAR file, but hosting the WAR in a `tomcat` server and terminate TLS there is another option. – dawud Apr 14 '14 at 20:22
  • So pipe through an Apache/Tomcat web server and implement https? –  Apr 14 '14 at 21:20
  • Linking to a previous answer for the same question: http://serverfault.com/a/278556/182956 – Patrice M. Apr 15 '14 at 14:00

1 Answers1

0

Your httpd.conf would look like this to reverse proxy the Jenkins.

VirtualHost *:80>
    DocumentRoot /var/www/html
    ProxyPass / http://localhost:8080 / nocanon
    ProxyPassReverse / http://localhost:8080/
    ProxyRequests Off
    ProxyPreserveHost On
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
    </Proxy>
</VirtualHost>


#<Proxy http://localhost:8080/jenkins*>
#       Order allow,deny
#       Allow from all
#</Proxy>
#ProxyPass /jenkins http://localhost:8080/jenkins nocanon
#ProxyPassReverse /jenkins http://localhost:8080/jenkins
#ProxyPassReverse /jenkins http://seedonkjenkins/jenkins

#ProxyPass                      /jenkins        http://localhost:8080/jenkins
#ProxyPassReverse               /jenkins        http://localhost:8080/jenkins
#ProxyRequests                  Off

SSLProxyEngine On
ProxyPreserveHost on
ProxyPass / https://localhost:8081
ProxyPassReverse / https://localhost:8081