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.
Asked
Active
Viewed 539 times
-1
-
sorry, i'm not clear hear it should be directed https(https:www.mydomain.com) – navin Aug 27 '17 at 01:25
1 Answers
0
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.

David
- 1,062
- 6
- 9
-
could you please be clear more in which path and where should I change, actually I was confused over here where to be change – navin Aug 27 '17 at 01:50
-
-
I've updated with a Mac OS X-specific command line to change the preferences if you used the OS X Jenkins Installer. – David Aug 27 '17 at 01:52
-
I changed the as you explained me and I run the command sudo defaults read /Library/Preferences/org.jenkins-ci ... and I see heap size...httpsListenAddress :127.0.0.1...and httpPort:8081 and etc... – navin Aug 27 '17 at 02:03
-
but still when hit that browse url i'm getting login page I wasn't able to login into even though. Do you know these is expected – navin Aug 27 '17 at 02:07
-