I have created VM instance for Ubuntu 14.4 and installed Apache2 on it. I created my project set up onto it (project has PHP and Wordpress and m SQL). I am able to get the access log when I hit it by public IP of VM, but now I wanted to access it by domain name. I have added server name into by own .conf file and linked it to sites-enabled on apache2. When I hit URL using domain name it only gives 522.
I have enabled port 80, 442 3306 from VM, and added SSL configuration into .conf file and certificates also.
If you want to access the websites on the Azure VM via domain DNS name, you could use either Azure provided DNS name or your custom domain in your DNS domain provider.
For using Azure provided DNS name, you could create FQDN for the Azure VM, restart the Azure VM then you can access the site via its FQDN URL.
For using your custom domain, you could add an A
or CNAME
record to map the subdomain like www.example.com
to your Azure VM IP or FQDN value in the domain example.com
. Then you could access the site via URL http://www.example.com. You could get more details about understanding CNAME and A records here.
Here is a tutorial: Install a LAMP web server on a Linux virtual machine in Azure
Hope this could help you.