I have created a custom farm abc.farm in the dispatcher config and created a symlink under enabled_farms
The issue is when I hit any page in local dispatcher, I see the request coming to the default_farm and not to my custom farm
However, if I rename the abc.farm to xyz.farm( to make sure the file is included below the default_farm) then I see the requests coming to my custom xyz.farm in the dispatcher logs
Not working scenario -
| - /available_farms
| - abc.farm
| - default.farm
Working scenario -
| - /available_farms
| - default.farm
| - xyz.farm
What could be the reason for this
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
To ensure your custom farm (abc.farm) is processed after the default farm, you can either:
Rename the Farm File:
Explicitly Control Inclusion Order:
Assuming your dispatcher configuration file is dispatcher.any, you can control the inclusion order like this:
# dispatcher.any /available_farms { /farms { "/default" { $include "/path/to/available_farms/default.farm" } "/abc" { $include "/path/to/available_farms/abc.farm" } } }
In this example, default.farm is explicitly included before abc.farm, ensuring the desired order of processing.
Hi,
Most likely you have an issue with your virtualHosts, please check how the farms and virtualHosts are resolved, this will clarify your doubts: https://experienceleague.adobe.com/en/docs/experience-manager-dispatcher/using/configuring/dispatche...
Hope this helps
Your default farm generally has a catch-all vhost configuration which means if a request is coming from a vhost which is not matched, it will by default go to that farm.
Since you are calling it from your local, if you have not set up a vhost it will by default go to the default farm itself.
You will probably have to setup a virtual host on your local (on widows you can do that by editing host file c:\WINDOWS\system32\drivers\etc\hosts), provide proper vhost entries in dispatcher config and then use that host to call the page.
Hope this helps.
But how does it work when I change the order of how the files are included, when I place the default_farm on top then I see the request coming to my custom farm
I would assume both your farms have similar entries for virtualhost (probably {"*"}), so dispatcher picks up the lowest farm entry by default as it will be a match. You can cross check that once.
No they are different, I also checked by removing the virtualhost section but still I dont see any changes
Even then as I mentioned default farm has catch-all configuration, and vhost evaluation is done from the bottom most farm, so if you will place your default-farm at the bottom, none of the other farms will be evaluated. Hence it is recommended to keep the default farm at the top
Therefore, you should place your default virtual host at the top of the virtualhosts property. PLace it in the topmost farm of your dispatcher.any file.
Hi,
To ensure your custom farm (abc.farm) is processed after the default farm, you can either:
Rename the Farm File:
Explicitly Control Inclusion Order:
Assuming your dispatcher configuration file is dispatcher.any, you can control the inclusion order like this:
# dispatcher.any /available_farms { /farms { "/default" { $include "/path/to/available_farms/default.farm" } "/abc" { $include "/path/to/available_farms/abc.farm" } } }
In this example, default.farm is explicitly included before abc.farm, ensuring the desired order of processing.
@hr-empd Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies