Best Practice for Deploying the Web Site in a Cloud Service


What's the best practice to deploy multiple Web site on Cloud Service ?

I have three web sites, is it possible to deploy those three web sites into one Cloud Service ? (Three instances in one Cloud Service)

Or Do I have to create three Cloud services and deploy each web site separetly ?

Thank you

My ServiceDefinition file:

  <WebRole name="WebRoleName" vmsize="ExtraSmall">
      <Site name="Web" physicalDirectory="../WebSite1">
          <Binding name="Endpoint1" endpointName="Endpoint1" />
      <Site name="Web2" physicalDirectory="..\..\..\WebSite2">
          <Binding name="Endpoint2" endpointName="Endpoint2" />
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
      <InputEndpoint name="Endpoint2" protocol="http" port="81" />
      <Import moduleName="Diagnostics" />
      <Import moduleName="RemoteAccess" />
      <Import moduleName="RemoteForwarder" />

By using that code, WebSite1 is available and WebSite2 is not, even by adding :81 I used the Remote Desktop to validate the deployment on IIS, and I saw that WebSite1 was correctly deployed but WebSite2 was not. WebSite2 and WebSite2.Test were two folders deployed below the Virtual Website Directory. By Copying manually the content, of the WebSite2 folder, below the Virtual WebSite Directory, i was able to access to my website via

What's the error ? Why the Test project is also deployed for WebSite2 ? (I made a check on the depedency and that's not selected)

Thank you

You could do either way. It really depends on what you need to do. If you want to host all your websites on port 80 under the same url for example:

then you can try this:

Alternatively if you don't necessarily need this implementation and you can host your websites under different ports, then you could create one instance under a separate role.

You could even have 1 cloud project per webrole, for instance if you wanted to have a test admin website to control your project, which shouldn't be included in production, you could have 2 cloud projects: 1 with all the production instances and 1 with your test admin website that you deploy as and when needed.