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"
Solved! Go to Solution.
Views
Replies
Total Likes
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?lan...
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.
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
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".
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?lan...
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.
Views
Likes
Replies
Views
Likes
Replies