|
||
Kentico CMS allows you to run more than one web project instance in a single Azure Web role. To enable this functionality, you only need to make a few adjustments to the service definition file. This topic describes the steps you need to take in order to add another website project to your Azure application.
1. Add another site to the <Sites> section of your service definition file, as highlighted in the following code example.
<Sites> <Site name="Web"> <Bindings> <Binding name="HttpIn" endpointName="HttpIn" /> </Bindings> </Site>
</Sites> |
2. Set the physicalDirectory parameter to the path to the directory where you have your second website project installed. You don't need to provide this parameter to the first site, because its default name "Web" instructs Visual Studio that the site definition is referring to the Web role project.
3. Specify a hostHeader for the second site. Similarly to IIS, two sites cannot listen on the same port without having a host header specified.
If you want the two sites to run on your local machine using the emulator, you will need to take the following additional steps:
1. Edit the hosts file from the following directory: <%SYSTEMROOT%>\System32\drivers\etc\.
2. Add mappings of your local IP address to host names, which you specified for sites in the service definition file. In the case of the provided example code, you would add the following line at the end of the file:
127.0.0.1 www.example.com |
There's no difference between deploying a standard application and deploying an application that runs more Kentico CMS instances in a Web role. To deploy your application, follow the steps described in the Deployment to the cloud topic.