A while back I created a small SharePoint test lab using Virtual Machines on Azure. I had a Domain Controller, a SQL Server and a SharePoint server. SharePoint was configured to host on
portal.contoso.com. All machines were part of the same Virtual Network I defined in Azure.
I was able to access the sites from each of the machines within the Vnet. However I didn’t want to RDP into a server machine just to access my SharePoint sites. After setting up the azure end-point I eagerly entered the URL
xxxxxxxx.cloudapp.net but was presented with a standard IIS welcome page and not my SharePoint portal.
So what’s up with that? Obviously the web browser is able to communicate with the IIS on the SharePoint server, but its not serving up the SharePoint site. The issue here is that IIS has multiple sites hosted on a single IP/Port combination and it decides which one to serve up based the Host Header that the browser includes in its request. When I’m using the browser on my server it sends
portal.contoso.com as host header, but from my home machine it will send
xxxxxxxx.cloudapp.net as host header which IIS doesn’t recognize.
This is how I solved it:
- using the Microsoft Azure portal, create two new Windows Azure endpoints that map between the internal ports for your site and Central Admin to the external ports on your Azure DNS name (
- Log on to Central Admin, go to Manage Web Applications and click on the web application that you want to make available
- Now Click on the Extend button in the Ribbon and fill in the port, hostheader and URL (way down at the bottom, not shown in screenshot):
In my case I didn’t change any of the authentication options as I did not want to grant anonymous access to the sites. If you do want this, then this is the place to do it
- Don’t panic if Central Admin doesn’t show an extra web application. If you open up IIS Manager, you’ll see it