Enable HTTPS in jenkins?
<p>I have a private network with a local IP.
I want to Enable HTTPS for my Jenkins server which is static IP W.X.Y.Z:8080.</p>

<pre><code>Jenkins version 2.9
java version "1.7.0_111"
OpenJDK Runtime Environment (IcedTea 2.6.7) (7u111-2.6.7-0ubuntu0.14.04.3)
OpenJDK 64-Bit Server VM (build 24.111-b01, mixed mode)
</code></pre>

<p>I have tried configuring in /etc/defaults/jenkins file the following arguments</p>

<pre><code>HTTP_PORT=-1
JENKINS_ARGS="--webroot=/var/cache/$NAME/war -DsessionTimeout=1 --httpPort=$HTTP_PORT  --httpsPort=8081"
</code></pre>

<p>But I get the following errors. Please help</p>

<pre><code>Running from: /usr/share/jenkins/jenkins.war
webroot: $user.home/.jenkins
Oct 19, 2016 2:18:48 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Logging initialized @811ms
Oct 19, 2016 2:18:48 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Oct 19, 2016 2:18:48 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Empty contextPath
Using one-time self-signed certificate
Oct 19, 2016 2:18:48 PM winstone.Logger logInternal
INFO: Winstone shutdown successfully
Oct 19, 2016 2:18:48 PM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start a listener
winstone.HttpsConnectorFactory
at winstone.Launcher.spawnListener(Launcher.java:207)
at winstone.Launcher.&lt;init&gt;(Launcher.java:149)
at winstone.Launcher.main(Launcher.java:352)`enter code here`
at sun.reflect.NativeMethodAccessorImpl.invoke0        
</code></pre>

<p>I found similar issues resolved here but it didn't work for me </p>

<p>EDIT1:
The following changes have been tried in /etc/defaults/jenkins file and restarted jenkins but it didn't work for me.</p>

<pre><code>HTTP_PORT=-1
JENKINS_ARGS="--webroot=/var/cache/$NAME/war -DsessionTimeout=1 --httpPort=$HTTP_PORT   --httpsPort=8443 --httpsCertificate=cert.pem --httpsPrivateKey=key.pem
</code></pre>

<p><a href="https://issues.jenkins-ci.org/browse/JENKINS-34463" rel="noreferrer">https://issues.jenkins-ci.org/browse/JENKINS-34463</a></p>

<p><a href="https://issues.jenkins-ci.org/browse/JENKINS-25333" rel="noreferrer">https://issues.jenkins-ci.org/browse/JENKINS-25333</a></p>