How can an Azure Web Site reach an Azure hosted vi

2019-09-12 22:46发布

问题:

How can an Azure Web Site reach an Azure hosted virtual machine?

We have a number of virtual machines hosted in Azure, linked to our internal network through ExpressRoute.

We're looking at setting up a web site in Azure Web App Service, and some backing web services in Azure App Service.

But the question is how the web site and web services can connect to the internal VM's, and the web services and SQL databases running on those VM's

回答1:

Assuming you don't want to open up ports on the VMs allowing direct internet traffic in, you could use the vnet integration feature of the Azure webapps. This connects the azure web app to your virtual network via point-to-site vpn to the virtual network gateway and is specifically designed to allow web apps access to resources running on your virtual network.

How to enable this for your website is explained here.