@addison
To configure Jenkins to use HTTPS instead of HTTP, you will need to follow these steps:
- Generate a SSL certificate and private key: You can either obtain a certificate from a trusted certificate authority (CA) or generate a self-signed certificate using tools like OpenSSL.
- Install the SSL certificate: Upload the SSL certificate and private key to a directory accessible by Jenkins.
- Configure Jenkins to use the SSL certificate: In the Jenkins configuration file (usually located at /etc/default/jenkins or /etc/sysconfig/jenkins), add the following lines:
JENKINS_HTTPS_KEYSTORE=/path/to/keystore.jks
JENKINS_HTTPS_KEYSTORE_PASSWORD=your_keystore_password
JENKINS_HTTPS_KEYSTORE_KEYPASSWORD=your_key_password
- Update Jenkins HTTP listener: In the Jenkins configuration file, modify the HTTP listener configuration to redirect HTTP requests to HTTPS. Add the following line:
JENKINS_ARGS="--httpPort=-1 --httpsPort=443"
- Restart Jenkins: Restart the Jenkins service to apply the changes.
- Access Jenkins using HTTPS: Jenkins should now be accessible over HTTPS at https://your_jenkins_url. Make sure to update any bookmarks or scripts that reference the old HTTP URL.
By following these steps, you can configure Jenkins to use HTTPS for secure communication.