Expand my Community achievements bar.

SOLVED

Multiple domains dispatcher breaking in AEMCaas

Avatar

Level 2

Hi Team,

 

I am facing a issue with dispatcher configurations with multiple Hosts.

I have 2 domains

www.domainA.com

www.domainB.com

 

I have defined vhost for them with entries

domainA.vhost:-

ServerName "www.domainA.com"

# Put names of which domains are used for your published site/content here

ServerAlias "127.0.0.1" "localhost" "*.local" "*.adobeaemcloud.com" "*.adobeaemcloud.net"

domainB.vhost:-

ServerName "www.domainB.com"

# Put names of which domains are used for your published site/content here

ServerAlias "127.0.0.1" "localhost" "*.local" "*.adobeaemcloud.com" "*.adobeaemcloud.net"

 

Akamai Configuration:---------------

www.domainA.com:-

  • Host header -> publish-p*****-e*****.adobeaemcloud.com
  • X-Forwarded-Host -> www.domainA.com
  • X-AEM-Edge-Key -> Environment key

www.domainB.com:-

  • Host header -> publish-p*****-e*****.adobeaemcloud.com
  • X-Forwarded-Host -> www.domainB.com 
  • X-AEM-Edge-Key -> Environment key

 

farm files and virtualhosts files are also separate for both of them as well the rewrite rules. But when I hit the domain, both of them resolve to single content path and take single farm file.

I have followed all public documents from adobe while setup

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/local-development-env...

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/conten...

 

What am I doing wrong? I know from Akamai its going to dispatcher and taking first farm which has "*.adobeaemcloud.com", so it can be any of them. If I remove the entry from one file, the second domain is also taking same farm. In AMS we used to have loadbalencer which was working with same configuration and files were picked up as expected. In AEMCaas we do not have loadbalencer I think so, CDN is taking content directly from Dispatcher and configurations are breaking.Anyone faced same issue?

 

Thanks,

Abhishek

1 Accepted Solution

Avatar

Correct answer by
Level 2

@Tanika02 @rawvarun , guess what was the issue? 

 

Adobe Support Engg gave wrong X-AEM-Edge-Key  . Instead he gave cache purge key. So whoever comes to this post please double check the key that you get from Adobe. Can't blame him, might be a human error. But it wasted my 3 days

 

Thanks,

Abhishek

View solution in original post

5 Replies

Avatar

Level 2

Hi @rawvarun , yes I followed all these articles . All of my configurations are working in local and in AMS. Only issue is on the moment we move to dev cloud.

Avatar

Community Advisor

Hello @abhishek14_03  - 

 

So basically it seems that you have configured separate vhost entries for domainA and domainB, as well as separate Akamai configurations. However, when hitting the domains, both resolve to a single content path and use a single farm file.

 

Here are a few things to check : 

 

1.Ensure that you have separate Dispatcher configurations for domainA and domainB. Check the Dispatcher configuration files (`dispatcher.any`, `dispatcher.vhosts`, etc.) to confirm that the configurations are correctly defined and separate for each domain.

 

2.In the `dispatcher.vhosts` file, make sure that the Virtual Host entry for domainA is listed before the entry for domainB. The order of the Virtual Host entries can determine which one is selected when there are overlapping configurations.

 

3. Double-check your Akamai configuration to ensure that it is correctly configured for each domain. Confirm that the `Host header`, `X-Forwarded-Host`, and `X-AEM-Edge-Key` values are set correctly for each domain.

 

4.If you have caching enabled, ensure that the cache invalidation settings are configured correctly for each domain. It's possible that the content is being cached and served from the cache, resulting in both domains resolving to the same content path.

 

5.Check the Dispatcher logs for any errors or warnings related to resolving the requests for domainA and domainB. Please share to help & understand the issue better.

 

https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-d... 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-as-cloud-service-multi... 

 

https://levelup.gitconnected.com/aem-multitenancy-running-multiple-websites-on-a-single-aem-environm... 

 

 

Avatar

Level 2

Hi @Tanika02 ,

 

1. Checked, OK

2. Both have different vhosts files with only their domain entry.

3.Checked , OK

4.Both domains have different cache docroot so they are making cache at respective folders.

5. Both of them are picking up single farm that logs are coming up there.

 

My real issue is

in earlier versions of AEM we used to have loadbalencer, that loadbalencer was configured as origin host in CDN,and divides the load to dispatcher based on domain, but in AEMCaaS, Publisher/dispatcher/LB is same i.e publish-p*****-e*****.adobeaemcloud.com which is same for both the origin hosts. How dispatcher will understand that request is coming from domainA or domainB? That is the task of Vhost files. Even if they are different why are they picking up same farm again, they should pick up its own farm.

 

 

 

 

Avatar

Correct answer by
Level 2

@Tanika02 @rawvarun , guess what was the issue? 

 

Adobe Support Engg gave wrong X-AEM-Edge-Key  . Instead he gave cache purge key. So whoever comes to this post please double check the key that you get from Adobe. Can't blame him, might be a human error. But it wasted my 3 days

 

Thanks,

Abhishek