简体   繁体   English

如何在 MacOS 上运行 jenkins 和 HTTPS

[英]How to run jenkins with HTTPS on MacOS

I have a MacOS based Machine, and I am running a Jenkins instance on it.我有一个基于 MacOS 的机器,我在上面运行一个 Jenkins 实例。 It run with HTTP protocol ( http://127.0.0.1:8080 ).它使用 HTTP 协议 ( http://127.0.0.1:8080 ) 运行。 I would like to run it SSL security ( https://127.0.0.1:8080 ).我想运行它 SSL security ( https://127.0.0.1:8080 )。

How to achieve this?如何做到这一点? Any help would be appreciated.任何帮助,将不胜感激。 Thanks.谢谢。

I tried running it on 8443 port (127.0.0.1:8443).我尝试在 8443 端口 (127.0.0.1:8443) 上运行它。 It didn't work.它没有用。

If you want your instance to just be available over https, you can configure that with the startup paramters, eg:如果您希望您的实例仅在 https 以上可用,您可以使用启动参数对其进行配置,例如:

--httpPort=-1 \
--httpsPort=443 \
--httpsKeyStore=path/to/keystore \
--httpsKeyStorePassword=keystorePassword

The keystore is a Java keystore with your certificate - if you need one, you can use let's encrypt or a self signed one.密钥库是一个带有证书的 Java 密钥库——如果您需要,可以使用 let's encrypt 或自签名证书。

For a bigger instance, I would recommend a reverse proxy in front of Jenkins. The documentation how to do this can be found here: https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-with-jenkins/对于更大的实例,我建议在 Jenkins 前面使用反向代理。可以在此处找到如何执行此操作的文档: https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration -与詹金斯/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM