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

Epi multisite

Vote:
 

Hi Team,

Requirement: Two sites with different logos, menus...etc but commerce catalog products are the same only.

We are tried to add another site(multisite) in our epi site(referred epi doc for that.).

Can anyone explain what we need to do in IIS for the new domain?

My doubt:

Is need to add any new instance for that?

Advance Thanks,

#204325
May 27, 2019 16:27
Vote:
 

Hey Karyan,

You don't "need" an additional Site or Instance in IIS. Episerver can run multiple sites within the same instance.

Check the following;

  1. In IIS, check that a Binding exists on the Site for the new Host Name. eg. domain1.com and domain2.com


    or allow any Host Name in the Site Bindings.


  2. In Episerver > CMS > Admin > Config > Manage Websites > Add Site. Enter the new Domain name as the Host name and provide a start page for the new site.

If you still can't work it out, please provide some extra information, and screenshots of IIS and Manage Websites and anything else such as Episerver version, IIS version etc.

#204334
Edited, May 28, 2019 1:41
Vote:
 

That's true. We had almost 30 sites for one of our customer and we just have to add domains in admin panel and point those domains in IIS binding. 

#204343
May 28, 2019 13:14
Vote:
 

Thanks Darren S, Sameer

We successfully added multisite(site1,site2). But we are facing some issues,

If login site1 first time it successfully logged. Then next I try to login site2 it throws some error like below

Access to XMLHttpRequest at 'https://site1/en/login-page/login' from origin 'https://site2' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

Please help me to resolve the issue

Advance Thanks,

#204375
Edited, May 29, 2019 16:17
Karyan - May 29, 2019 16:18
Note:
epi ver:11.93

We find below the post and tried solution marked as an answer but no luck it not worked for us.

"https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2018/5/multisite-returns-main-site-after-a-short-while/" 
Vote:
 

Can you try adding HTTP Response Headers?

Add following values to allow CORS (Cross-origin resource sharing).

In order to do this. Go to IIS, select your site and double click on following icon.

Add following values (Add button is in Actions pan, at right side):

'Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS'
'Access-Control-Allow-Headers', "Origin, X-Requested-With, Content-Type, Accept, Authorization"

Note: I think you will need to add only Content-Type in Access-Control-Allow-Headers parameter.

Let me know if that works or not :)

Thanks & Regards

Praful Jangid

#204391
May 30, 2019 10:03
Vote:
 

Thanks praful,

I think below line makes issues I think

UrlResolver.Current.GetUrl(Model.HeaderBlock.loginPage).

When I am loading site2.it returns with base URL "https://site1/loginpage/login". I don't know why it happens.

#204393
May 30, 2019 18:36
* 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.