Hi ,
I am trying to setup multiple domains on the AEM cloud and i have done all the vhosts and farm configuration. I am able to render both sites with different docroot . However i am having trouble invalidating dispatcher cache when replicating the page from author to publish and the dispatcher cache invalidation. when i try to publish the the XML, the cache invalidation needs to be done for "wwwfarm" however i am always seeing localhost being selected and its going to the last farm "stagefarm' and invalidating in the wrong path. I did not find anything related this adobe documentation. If we have multiple sites with different docroot on the same AEM cloud instances how do we invalidate the dispatcher cache on the right cache directory. Any inputs are appreciated?
farms[wwwfarm].cache.docroot = /mnt/var/www/html/www ----> www.site1.com
farms[stagefarm].cache.docroot = /mnt/var/www/html/stage ---> www.site2.com
No farm matches host 'localhost', selected last farm 'stagefarm', referer: about:blank
Found farm stagefarm for localhost, referer: about:blank
checking [/dispatcher/invalidate.cache], referer: about:blank
Activation detected: action=Activate [/content/dam/www/xml-sitemaps/es-sitemap.xml], referer: about:blank
Touched /mnt/var/www/html/stage/.stat, referer: about:blank
Touched /mnt/var/www/html/stage/content/.stat, referer: about:blank
Touched /mnt/var/www/html/stage/content/dam/.stat, referer: about:blank
response.status = 200, referer: about:blank
response.headers[Server] = "Communique/2.6.3 (build 5221)", referer: about:blank
cache flushed,
Solved! Go to Solution.
Views
Replies
Total Likes
if you are doing that way then you need to have a separate Configuration of Dispatcher farm for invalidating the content.
see Configure Dispatcher to Handle Multiple Domains section on https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-d...
"Configure a Dispatcher farm that is used for invalidating content the cache, regardless of which domain the content belongs to. This farm handles file invalidation requests from Flush Dispatcher replication agents."
For proper Dispatcher invalidation, make sure that requests from “127.0.0.1”, “localhost”, “.local”, “.adobeaemcloud.com”, and “.adobeaemcloud.net” are all matched and handled by a vhost configuration so the request can be served. You can do this task by global matching “*” in a catch-all vhost configuration following the pattern in the reference AEM archetype. Or, you can ensure that the previously mentioned list is caught by one of the vhosts.
i did have those defined, but when the page is published the cache invalidation does not seem to going to the right folder. Does both Vhosts needs to have the localhost defined? How does the cache
<VirtualHost *:80>
ServerName site1.com
# Put names of which domains are used for your published site/content here
# ServerAlias "*"
ServerAlias "localhost"
ServerAlias "*.local"
ServerAlias "www.site1.com"
ServerAlias "*.adobeaemcloud.com"
ServerAlias "*.adobeaemcloud.net"
ServerAlias "publish*.adobeaemcloud.net"
ServerAlias "publish*.adobeaemcloud.com"
ServerAlias "preview*.adobeaemcloud.com"
DocumentRoot "${DOCROOT}/www"
<VirtualHost *:80>
ServerName site2.com
# Put names of which domains are used for your published site/content here
# ServerAlias "*"
ServerAlias "localhost"
ServerAlias "*.local"
ServerAlias "www.site2.com"
ServerAlias "*.adobeaemcloud.com"
ServerAlias "*.adobeaemcloud.net"
ServerAlias "publish*.adobeaemcloud.net"
ServerAlias "publish*.adobeaemcloud.com"
ServerAlias "preview*.adobeaemcloud.com"
DocumentRoot "${DOCROOT}/stage"
Yes, both vhost should have those configuration. Is it still selecting the wrong farm for you?
Correct, wrong farm is being selected when i am publishing page or assets to invalidate the dispatcher cache.
Can you try with updating those values in virtualhosts section of your farm configuration as well and check if that helps.
i have added the values localhost”, “.local”, “.adobeaemcloud.com”, and “.adobeaemcloud.net in the virtual host section of both farm but it did not work the farm selection does not seem to work when invalidating the cache between different content sites. I found this link but i am not sure how this can be done for cloud since we would be using SCD and not setting up agent as such.
Tt seems the configs are right. the problem is you are creating 2 different farms prod and stage with similar configuration on vhost and is always going to last farm. Normally you shouldn't use separate farms for stage and prod and it should behaves same for all environment. Different farm is only required when you have different configuration for multiple sites for same environment.
Thats just my naming convention, i does not directly correlate to the AEM stage and PROD on cloud. I do have multiple sites in the same environment.
separate docroot is not required for dispatcher configuration for multiple site. you can work with same docroot folder for all sites configuration per environment
Is that how its done for the cloud ? per adobe documentation it said we need to setup a docroot for each site and dispacther from the documentation below
if you are doing that way then you need to have a separate Configuration of Dispatcher farm for invalidating the content.
see Configure Dispatcher to Handle Multiple Domains section on https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-d...
"Configure a Dispatcher farm that is used for invalidating content the cache, regardless of which domain the content belongs to. This farm handles file invalidation requests from Flush Dispatcher replication agents."
Hi,
I have multiple domain setup on dispatcher each domain is configured in separate vhost file and farm files.
When i publish page on author, cache invalidating is not happening. may i know how to set up cache invalidation for multiple domains?
Views
Replies
Total Likes
@ragucis I also faced this issue. The issue is because the default host is picked up by default on priority list. So to change the order of the loading vhost or farm files add 111_******** to the enable_vhosts files or enable_farm files. refer to below screenshot. If you are still unable to understand the issue DM . I can explain it
hi @Jagadeesh_Prakash I have already done this and my enable_vhosts files or enable_farm files are loading in the correct order and i have then numbered like 001_wwfarm and 002_stagefarm . The invalidation seem to be going to right path when coming the domain name is attached and TTL expires , only issue is invalidation when publishing pages from author to publish on cloud.
Views
Likes
Replies