Home:ALL Converter>What is the correct way to set up a web server hosting a web site with an Azure VM?

What is the correct way to set up a web server hosting a web site with an Azure VM?

Ask Time:2020-08-26T23:14:18         Author:Abhishek Sharma

Json Formatter

I have a small web page that I am currently using an Azure Linux VM running nginx to host. The domain name itself is managed by google domains, but I've set it to use azure endpoints for domain name resolution. I have created a DNS zone for the website and added A & AAAA * records that resolve to the IP address of the VM I have created.

The problem is that the Azure VM I have set up randomly fails-over to a new IP-address. And this isn't a rare occurrence - it seems to happen once every couple of weeks. This is causing my web site to go down randomly because the Azure DNS servers no longer resolve the domain name to the correct IP address. I have no idea why this happens and googling the phenomenon seems to yield no actionable results.

Is there something that I'm missing here? What's the correct way to set up a VM-backed web site?

Author:Abhishek Sharma,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/63600631/what-is-the-correct-way-to-set-up-a-web-server-hosting-a-web-site-with-an-azure
yy