Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, June 13, 2018 11:28 AM
Good day
Sorry if this is a simple question but
I was looking to setup HTTPS connection to website I have running on an Azure virtual machine,
but unlike azure web app and web services there isn't an option to buy a certificate. Now i can buy
from a 3rd party, but most don't give you the option buy for a specific public ip address, but rather a domain. How do I go about setting up a unique domain name on Azure, for which to buy the certificate for And is there any other configuration that needs to be different when installing a certificate on An Azure VM to a regular physical server. Any help would be appreciated.
Thanks in advance
Matt
All replies (5)
Wednesday, June 13, 2018 3:12 PM
Could you confirm if you are trying on Windows VM or Linux VM?
Certificate needs to be configured on OS level. Azure VM is IaaS. It cannot configure the settings on OS directly. That's the reason why we need the Azure VM Agents.
VM uses the cloud service layer and you have to install the certificate as you would in virtual machine and add the Host A register to your DNS provider.
Suggest you to check the answer given by @Bruno Faria in the link.
Also, check the below articles for more information:
/en-us/azure/virtual-machines/windows/tutorial-secure-web-server
/en-us/azure/virtual-machines/linux/tutorial-secure-web-server
If you are trying on Azure portal then you may also refer the article.
Sunday, June 17, 2018 11:42 AM
Checking, if you have had a chance to work on this query?
Do let us know if you need any help.
Monday, June 18, 2018 1:59 PM
Thanks for the response,
I tried coming to a solution but am still struggling.
I am trying to install the certificate on a windows VM.
Using the links you provided i managed to get to the point where I have an app service certificate created and verified, but now I have to import it to the VM and am a bit confused.
using this link "https://docs.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-secure-web-server" i tried to add the certificate to the VM but failed. Im not good at using powershell so im not sure which values I need to change or how to go about it.
Thanks
Tuesday, June 19, 2018 10:28 AM
Could you help us with the error message you get while adding certificate to Azure VM?
You Add a certificate to VM with the help of following commands :
1.The below command get the certificate from key vault created in the section “Generate a certificate and store in Key Vault”
$certURL=(Get-AzureKeyVaultSecret -VaultName $keyvaultName -Name "mycert").id
2.The below command adds certificate to the Azure VM:
$vm=Get-AzureRmVM -ResourceGroupName $resourceGroup -Name "myVM"
$vaultId=(Get-AzureRmKeyVault -ResourceGroupName $resourceGroup -VaultName $keyVaultName).ResourceId
$vm = Add-AzureRmVMSecret -VM $vm -SourceVaultId $vaultId -CertificateStore "My" -CertificateUrl $certURL
3.The below command helps you to update the Azure VM when certificate is added in the second step:
Update-AzureRmVM -ResourceGroupName $resourceGroup -VM $vm
Thursday, June 21, 2018 3:09 PM
Just checking in if you have had a chance to see the previous response.
Do let us know if you need any help.