AEMaaCS Dispatcher Vhost issue | Adobe Higher Education
Skip to main content
Level 2
July 18, 2023
해결됨

AEMaaCS Dispatcher Vhost issue

  • July 18, 2023
  • 1 답변
  • 2096 조회

Hi , 

 

We have recently migrated to AEMaaCS and i have been trying to setup a new site but seeing issue with correct vhost not being picked up and also not  caching. Below is my setup. We are front loading these websites with Akamai and using X-AEM-Edge-Key. When i am trying to access stage.site2.com , i am always being served from vhost "site1.com" and i am seeing the below message in the logs as well , Below is my setup and do you find any issues with the below and what might be the issue ? Any pointed would be appreciated

 

No farm matches host 'publish-p***-e****.adobeaemcloud.com', selected last farm 'site2'<VirtualHost *:80> ServerName site1.com # Put names of which domains are used for your published site/content here # ServerAlias "*" ServerAlias "localhost" ServerAlias "*.local" ServerAlias "publish*.adobeaemcloud.net" ServerAlias "publish*.adobeaemcloud.com" ServerAlias "preview*.adobeaemcloud.com" ServerAlias "uat.site1.com" ServerAlias "stage.site1.com" ServerAlias "www.site1.com" <IfModule mod_headers.c> Header add X-Vhost "publish-site1" </IfModule> </VirtualHost> <VirtualHost *:80> ServerName site2.com # Put names of which domains are used for your published site/content here ServerAlias "publish*.adobeaemcloud.net" ServerAlias "publish*.adobeaemcloud.com" ServerAlias "preview*.adobeaemcloud.com" ServerAlias "www.site2.com" ServerAlias "site2.com" ServerAlias "stage.site2.com" <IfModule mod_headers.c> Header add X-Vhost "publish-site2" </VirtualHost>I have separate files for farms in enabled_farms /site1 { # client headers which should be passed through to the render instances # (feature supported since dispatcher build 2.6.3.5222) /clientheaders { $include "../clientheaders/clientheaders.any" } # hostname globbing for farm selection (virtual domain addressing) /virtualhosts { $include "../virtualhosts/001_site1_virtualhosts.any" } /site2 { # client headers which should be passed through to the render instances # (feature supported since dispatcher build 2.6.3.5222) /clientheaders { $include "../clientheaders/clientheaders.any" } # hostname globbing for farm selection (virtual domain addressing) /virtualhosts { $include "../virtualhosts/002_site2_virtualhosts.any" } Here is my vhosts.any files 001_site1_virtualhosts.any "site1.com" "www.site1.com" "stage.site1.com" "uat.site1.com" 002_site2_virtualhosts.any "site2.com" "www.site2.com" "stage.site2.com" "uat.site2.com"

 

 

이 주제는 답변이 닫혔습니다.
최고의 답변: DPrakashRaj

The log that you shared suggest there is no matching virtualhost for the request. See https://experienceleague.adobe.com/docs/experience-manager-learn/ams/dispatcher/common-logs.html?lang=en

you can get the answer for your second question in the above link as well.

see the below comment on the above link.

 

The farm files match traffic based on the domain name or path in which the request came in with. It uses glob matching and if it doesn’t match then you’ve either not configured your farm properly, typo’d the entry into the farm, or have the entry missing entirely. When the farm doesn’t match any entries it finally just defaults to the last farm included in the stack of farm files included. In this example it was 999_ams_publish_farm.any which is named the generic name of publishfarm.

1 답변

DPrakashRaj
Community Advisor
Community Advisor
July 18, 2023

This error 

No farm matches host 'publish-p***-e****.adobeaemcloud.com', selected last farm 'site2'

Suggest the dispatcher farms virtual host section doesn’t have entry to publish-p***-e****.adobeaemcloud.com that’s why it’s not able to select the farm so falling back to previous farm.

I believe you don’t need to add publisher url in server alias section of your vhost file

Level 2
July 18, 2023

Thanks , Is it mandatory to have the publish urls also in the dispatcher farms vhost ?

also it does not answer why when i access the stage.site2.com , i am getting the content served from the site1 vhost, I am identifying this through the host headers X-vhost which return "publish-site".

DPrakashRaj
Community Advisor
Community Advisor
July 19, 2023

The log that you shared suggest there is no matching virtualhost for the request. See https://experienceleague.adobe.com/docs/experience-manager-learn/ams/dispatcher/common-logs.html?lang=en

you can get the answer for your second question in the above link as well.

see the below comment on the above link.

 

The farm files match traffic based on the domain name or path in which the request came in with. It uses glob matching and if it doesn’t match then you’ve either not configured your farm properly, typo’d the entry into the farm, or have the entry missing entirely. When the farm doesn’t match any entries it finally just defaults to the last farm included in the stack of farm files included. In this example it was 999_ams_publish_farm.any which is named the generic name of publishfarm.