Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

AEM Cloud Dispatcher is ignoring the vhost files

Avatar

Level 2

My dispatcher code is working fine on local docker but the same does not happen on cloud as I could not see my custom vhost getting invoked. I could not change the name of the default vhost as it throws error during build as validation. Pages gives 404 with log giving blocked error when using domain url. I tried allowing things on filter but nothing helps

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi, 

Are you able to validate the code in your local instance ?  Recommend to validate the config and then generate the same in an out folder. Later use the out folder cofigurations to start the docker and check the functionalities in local instance before deploying to cloud. 

 

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

 

Thanks,

Somen

View solution in original post

10 Replies

Avatar

Community Advisor

Hello @pasridharan 

 

Can you possibly share how the dispatcher file structure looks for you currently?


Aanchal Sikka

Avatar

Level 2

Hi,

 

Its exactly similar to https://github.com/adobe/aem-guides-wknd/tree/main/dispatcher/src. I'm using windows machine to generate symlink. I can see the enabled host and enabled farm with symlink on the git and Azure repo

Avatar

Community Advisor

Hello @pasridharan 

 

Will it be possible for anyone with a mac machine to generate symlinks and push them to git?

 


Aanchal Sikka

Avatar

Correct answer by
Level 6

Hi, 

Are you able to validate the code in your local instance ?  Recommend to validate the config and then generate the same in an out folder. Later use the out folder cofigurations to start the docker and check the functionalities in local instance before deploying to cloud. 

 

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

 

Thanks,

Somen

Avatar

Level 2

yes in local things works fine. I'm able to see out folder and url shortening are working fine

Avatar

Community Advisor

Try to add your changes directly in available vhost file just for testing .

Himanshu Jain

Avatar

Community Advisor

@pasridharan 

 

Can you check if your dispatcher is compiling with below command and also check if the files are populating in out folder.

bin\validator full -d out src

 

if still it is not working once check in the logs for error and share it here 

 

 

Avatar

Level 2

Hi, Yes my dispatcher code on local is compiling and getting build and the url shortening are working fine in local without error and we have tested the pages with shortened url with local docker which also stores the cache files. however, on cloud, I'm facing request url not found with 404

Avatar

Employee Advisor

@pasridharan You have not provided enough details to suggest anything. Always add proper details/ snapshots to issue. 

 

1. throws error during build as validation- What error? Put log trails to identify root cause.

2. Pages gives 404 with log giving blocked error-  Again no trace to error

 

My guess is that you have not done all necessary configurations needed to enable a new vhost. Read through this document to understand if your farm is configured properly to serve the desired domain - [0]

 

Also, you should enable trace logging to debug this better- [1]

 

[0]- https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c... 

[1]- https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c... 

Avatar

Community Advisor

Hi @pasridharan ,

You should not change anything file named default_ as. You can read there is note inside the file 

DO NOT EDIT this file, your changes will have no impact on your deployment.

As per the documentation, 

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

You should create your custom vhost in available directory, and include custom host file and then put your logic in that, make that custom.
Also, worth reading this article for Read Only or Immutable files: https://experienceleague.adobe.com/docs/experience-manager-learn/ams/dispatcher/immutable-files.html...

 

Hope that helps!

Regards,

Santosh