azurestaginghostheaders

Windows Azure Multiple Sites under single role - Staging Issue with host header


I have a "web" and "mobile" site that I'm launching within Azure of the same domain. Originally I was going to run each as a separate hosted service but this doubles the cost though it would allow me to scale each independently.

Then I learned that you could run multiple sites under one web role using hostheaders similar to your standard iis site. I love the swap VIP button on Azure that let's you deploy your "staging" site instantly to "production" but I'm not sure how to take advantage of this if I'm using hostheaders; in my set-up, the "staging" site that is using hostheaders is effectively hidden until I push to production.

Any thoughts on how to test the staging site that is using host headers without having to modify the ServiceDefinition.csdef file before pushing to production?


Solution

  • Edit %windir%\system32\drivers\etc\hosts, and map the hosts you want to the IP address of your staging deployment.