By vnaveen1918
We had Jenkins installed on mac os x, and it is unsecured. Using let’s encrypt, we secured the Jenkins. Here Apache is acting as reverse proxy and both the sites are available. But now we need to redirect the old http URL (http://example.com:8081). When we hit HTTP from outside, the browsers should be redirected to the HTTPS(https://example.com). In which config file I need to change, I can post the images once if anyone responded regarding these issue, Please help me to figure out . Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sorry you didn’t receive any answers to your question earlier. I’m assuming you have already figured it out. In case anyone found this page via search, you will want to configure Apache to listen on port 8081 externally to perform the HTTP->HTTPS redirect, and Jenkins to listen on port 8081 internally so that Apache can forward traffic to it.
To do so, edit Jenkin’s configuration file and set httpListenAddress to 127.0.0.1. Then, create a VirtualHost in Apache to redirect to the HTTPS URL:
<VirtualHost *:8081>
ServerName example.com
Redirect / https://example.com
</VirtualHost>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.