how can i get jenkins stop listening on for remote connection on mac os x `

actually my Jenkins server is installed on mac os x, and it is having unsecured http port 8081(http:www.mydomain.com:8081). We changed http to https by securing with letsencypt and using apache as reverse proxy and everything working fine and moreover we are able to login both http and https urls. But actually we need Jenkins stop listening that and should listen on local host and more over when I hit http port it should be directed to http. Could someone please help me out. Thanks in adavance.

Answer

Pass the flag --httpListenAddress=127.0.0.1 to Jenkins. This will cause it to only bind to localhost. On Mac OS X, you can do the equivalent by updating the Jenkins plist by running:

sudo defaults write /Library/Preferences/org.jenkins-ci httpListenAddress 127.0.0.1

You can then use Apache to receive all traffic on other interfaces, and can add a mod_rewrite rule to redirect to https.

Attribution
Source : Link , Question Author : navin , Answer Author : David

Leave a Comment