Multiple Websites on one WebRole

by Rok Bermež 28. August 2011 17:54

With Windows Azure SDK 1.3, you can run multiple Web Sites in a single Web role. Prior to Windows Azure SDK 1.3, each Web role ran a single Web application. This constraint was largely because Web roles were hosted in IIS Hosted Web Core where a single application was bound to a single HTTP/HTTPS endpoint. Now, Windows Azure supports full IIS capabilities allowing Web roles to support multiple Web sites and Web applications.

By using the Sites element within the service definition file, ServiceDefinition.csdef, you can configure your web role to support multiple web sites and web applications. This is accomplished using the sites, applications, and virtual directories features in Internet Information Services (IIS) 7.0. These features enable each web role in Windows Azure to support configuration for multiple web sites and applications.

Take a look at the sample ServiceDefinition.csdef:

As you can see all you have to do is set path to other web applications that you want to co-host in your role and set their host headers and endpoints. CSpack will do the rest :)

Tags:

Add comment

Calendar

<<  September 2018  >>
MonTueWedThuFriSatSun
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Page List

Month List