0
votes

I am new to Azure. I have a linux vm hosted in Azure, on which I am running a springboot application. The springboot app runs behind an Apache httpd.

DNS name for the host is something like xyz.cloudapp.azure.com and i need to create a sub domain (abc.xyz.cloudapp.azure.com) to host few files on my server. I have made following configuration in the httpd conf to route the requests for sub domain

<VirtualHost *:443>
    ServerName abc.xyz.cloudapp.azure.com
    ServerAlias xyz.cloudapp.azure.com
    DocumentRoot /var/pathforsubdomainfiles
    .......................
    enter code here....................
</VirtualHost>

I am not able to figure out how to create a DNS record for the subdomain (abc.xyz.cloudapp.azure.com) in Azure so that it could be resolved over a public network to access the hosted files. I do not have any DNS zones created in Azure yet.

1

1 Answers

0
votes

As far as I know, you can create a fully qualified domain name in the Azure portal for a Azure VM. The FQDN is something like abc.eastus.cloudapp.azure.com. It has a subdomain (abc.xyz.cloudapp.azure.com) in Azure.

If this is not what you desired, you need to purchase a public domain like example.com from a domain provider like GoDaddy and create DNS records to map this subdomain like www.example.com to the public IP address or FQDN for the Azure VM because you can not create DNS records for the Azure provided domain xyz.cloudapp.azure.com. In the process of creating DNS records, you have a option to host your domain in Azure DNS and manage your domain in Azure.

For more information, you could read this blog.