How to redirect HTTP TO HTTPS on Mac OS X

August 29, 2017 669 views
Apache Let's Encrypt

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 ( When we hit HTTP from outside, the browsers should be redirected to the HTTPS(
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 .

1 Answer

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 Then, create a VirtualHost in Apache to redirect to the HTTPS URL:

<VirtualHost *:8081>
    Redirect /
Have another answer? Share your knowledge.