Reputation: 86967
We currently host our site on IIS on our own virtual machine. Works great.
Our main website has around 30 or so bindings, which we use to customize the html output. Each binding is a theme, to us. So red.mywebsite.com will have a red background, for example.
If we move over to azure web site, does azure allow us to do this also?
If yes, can we do this programatically?
Upvotes: 2
Views: 1882
Reputation: 30903
Yes, Azure Web Sites does support multiple bindings per single web site.
This feature is, however, only available for Shared
and Reserved
instances scale mode.
Configuring the the bindings is done via Custom Domain Management for the targeted Web Site. You can add multiple custom domains, which effectively will edit the bindings in IIS. However you must be aware that SSL is not yet available for Azure Web Sites.
There is also programmatic way of managing the bindings, but is not documented yet, as this feature is preview. You can manage Azure Web Sites via the Windows Azure PowerShell Management cmdlets. But this is not yet documented. If you get the latest Windows Azure PowerShell from here you will have these commands:
There is also REST Management API (which is used by the PowerShell cmdlets), and it also is not documented :(
Simple reverse engineering (using fiddler) shows that the *AzureWebsite commands connect to the following address:
https://management.core.windows.net/[subscription-id]/services/webspaces/
Just a quick note, help for the command Set-AzureWebsite
shows there is a switch -HostNames
, which is documented as follows:
-HostNames <String[]>
The fully qualified hostnames that can be used to access the website
I believe this is what you will need.
You could try digging in deeper.
Upvotes: 7