khoailang
khoailang

Reputation: 744

Host a web site in an Azure VM

I have a Azure VM. Using the IIS, I host a website in the VM.

How can I access that website via the DNS name (like http://abc.cloudapp.net/) I know this is the most unlikely, we should use the "web role", but I really need this works, is this possible?

I tried with the localhost, it works, the internal IP works, but the DNS name doesn't.

Edited to provide more info (March 09): I have already have endpoints setup. "binding" uses the dns name. I have two website, one hosted in the port 8081, it works. Another one hosted in the port 80, which doesn't work.

http endpoints enter image description here

the port 80 doesn't work enter image description here

the port 8081 works enter image description here

Upvotes: 0

Views: 1533

Answers (1)

Matias Quaranta
Matias Quaranta

Reputation: 15603

If I understand correctly, your VM already has a Azure domain in the form of myvmname.cloudapp.net right?

First you need to add an ENDPOINT in the VM that bridges the port 80 from outsite to inside (if that is the port indeed you configured in IIS).

enter image description here

Then, you need to add a CNAME record in your DNS table that points from www.mydomain.ext to myvmname.cloudapp.net (obviously replacing the correct values).

Upvotes: 0

Related Questions