简体   繁体   中英

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). 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. 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. Since a reply URL must be HTTPS, I'm currently trying to enable HTTPS for the Jenkins server. 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. I'm not sure if Azure has the same behavior.

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?

So, evilSnobu did suggest using a reverse proxy into Jenkins to get an HTTPS server up and running. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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