简体   繁体   English

为 Azure Linux 虚拟机启用 HTTPS

[英]Enable HTTPS for Azure Linux Virtual Machine

I'm currently trying to enable Authentication via Azure Active Directory for a Jenkins that's running via Azure's Virtual Machine service (not App Services).我目前正在尝试通过 Azure Active Directory 为通过 Azure 的虚拟机服务(不是应用服务)运行的 Jenkins 启用身份验证。 I've used Microsoft's tutorial on setting up the server as well as installing the Azure AD plugin and following the instructions the plugin page to set up the authentication.我使用了微软关于设置服务器以及安装Azure AD 插件教程,并按照插件页面的说明设置身份验证。 I've almost got it working, but when actually trying to login, I get the following error message:我几乎可以正常工作,但是当实际尝试登录时,我收到以下错误消息:

AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: '<GUID goes here>'

Upon a closer look, there's a mismatch with the reply URL because the Jenkins server is currently using HTTP while the reply URL is using HTTPS. Upon a closer look, there's a mismatch with the reply URL because the Jenkins server is currently using HTTP while the reply URL is using HTTPS. Since a reply URL must be HTTPS, I'm currently trying to enable HTTPS for the Jenkins server.由于回复 URL 必须是 HTTPS,我目前正在尝试为 Z233E54338CABCEDF3A 服务器启用 HTTPS。 In my research, most of it involves App Services, but I'm mainly trying to enable it for virtual machines .在我的研究中,大部分都涉及应用服务,但我主要是尝试为虚拟机启用它。

When I tried this in AWS, I learned that you couldn't use tools that supply a free SSL certificate since the virtual machine could be swapped out at anytime.当我在 AWS 中尝试此操作时,我了解到您无法使用提供免费 SSL 证书的工具,因为可以随时更换虚拟机。 I'm not sure if Azure has the same behavior.我不确定 Azure 是否具有相同的行为。

Can I use one of the free tools like LetsEncrypt or do I need to buy an SSL certificate for the case of virtual machines?我可以使用 LetsEncrypt 之类的免费工具之一,还是需要为虚拟机购买 SSL 证书?

So, evilSnobu did suggest using a reverse proxy into Jenkins to get an HTTPS server up and running.因此,evilSnobu 确实建议在 Jenkins 中使用反向代理来启动并运行 HTTPS 服务器。 While I tried the link that he provided, I had some issues with getting it working as Let's Encrypt had trouble with the Azure virtual machine.当我尝试他提供的链接时,我遇到了一些问题,因为 Let's Encrypt 在 Azure 虚拟机上遇到了问题。

I found Kerren Ortlepp's article to be very helpful in helping me set up a reverse proxy for Jenkins within the Azure virtual machine.我发现Kerren Ortlepp 的文章对帮助我在 Azure 虚拟机中为 Jenkins 设置反向代理非常有帮助。

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

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