Azure Virtual Machine hosting - more than one domain to same IP address?

rwallacej
rwallacej used Ask the Experts™
on
Hi

I have a Azure Virtual Machine VM with fixed IP , say 123.456.789.101
I want this Azure VM to host more than one website, the different websites having different domains, but not sure if this can be done

Can I have more than one domain map to this single Azure Virtual Machine IP, and the different domains to different virtual directories/sites on the same Azure  Virtual machine?

So I have 3 domains say
www.abc.com    - this should go to site one say 123.456.789.101/abc
www.def.com  - this should go to site two say 123.456.789.101/def
www.ghi.com - this should go to another site say 123.456.789.101/ghi

I don't want user to have to type in virtual directory
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
nociSoftware Engineer
Distinguished Expert 2018

Commented:
Then you create domain within the webserver, and assign a different root to each of the domains.
(The top level directory is specified there).
Top Expert 2016
Commented:
exactly the same way one would do it with a local machine. add the bindings for the additional domain name.
in iis for every website use new website command.new website

Author

Commented:
thanks
how does this work with respect to  PORTS ?
can all sites still be on PORT 80 ?
Top Expert 2016

Commented:
yes, in the bindings set the hostname (domain name)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial