November Happy Hour will be moved to Thursday December 5th.

Multi-Site setup CMS 12 - Locally

Vote:
 

Hello,

I have been trying to set up another site locally, 
According to https://docs.developers.optimizely.com/content-cloud/v12.0.0-content-cloud/docs/setting-up-multiple-sites 

The following steps show how you set up multiple sites:

  1. IIS to configure host name mapping to websites, to listen to any host name or specific host names.
  2. Optimizely CMS admin view to add a new website.

For the IIS configuration, there is nothing mentioned there, so I am a bit lost.

I will mention some of the things I tried to change locally but still was not able to get into the second site

1. Added new hostname in hosts file 
   For example #    127.0.0.1       localhost.uk
2. Updated the applicationhost.config
   <binding protocol="https" bindingInformation="*:44364:localhost.uk" />
3. Added the new site in Optimizely 

this is also what I had as a reference to those changes

https://world.optimizely.com/forum/developer-forum/CMS/Thread-Container/2019/6/multi-site-and-localhost-visual-studio-debug-mode-using-iis-express/#204478

the second site still not working locally, is there any other changes needs to be done?

regards, 

#295066
Jan 20, 2023 14:07
Vote:
 
#295068
Jan 20, 2023 14:26
Hadeel - Jan 20, 2023 15:56
I tried adding the two URLs in Program.cs but still not working
Have you added anything to the files I mentioned? applicationhost.config or hosts file?
Minesh Shah (Netcel) - Jan 20, 2023 16:00
no my applicationhost.config was as default and as I was using localhost did not add anything to the hosts file. I was using Kestrel and not IIS.
Vote:
 

@Hadeel

I have just tested this with a local IIS Setup and just using multiple bindings seems to work for me, without doing anything extra 

see here 

Hosts File

IIS Setup

Optimizely Hosts 

Page Tree

Website 1

Website 2

#295107
Jan 20, 2023 17:41
Hadeel - Jan 23, 2023 14:14
Thanks for testing this.

one question, have you done any changes to the Launchsetting.json in the project?
Minesh Shah (Netcel) - Jan 23, 2023 14:18
No this is still the default values i.e.
{
"profiles": {
"MultisitePOC": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5000/",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.