Hi everyone,
I'm trying to set up the Apache Dispatcher locally for an AEM AMS (Adobe Managed Services) environment but want to leverage the AEM as a Cloud Service SDK to make local development and testing easier.
However, I’m running into issues - I suspect the Cloud SDK may not be fully compatible with the AMS dispatcher setup, and manually configuring the dispatcher for AMS (eg. Apache configs, SSL, farms, etc.) is proving to be a tedious and time-consuming process.
Is there any streamlined or recommended way to set up Dispatcher locally for AMS projects more efficiently?
Any tools, scripts, or starter templates that can help speed this up would be appreciated!
Thanks in advance.
Solved! Go to Solution.
Hi @Luca_Moreau,
AEM Cloud SDK is designed for AEM as a Cloud Service and has Dispatcher tools/configs optimized for Cloud Service environments, which differ significantly from AMS setups (e.g., versioning, Apache 2.4 vs. 2.2 compatibility, legacy modules, etc.).
I recently used the aem-dispatcher-docker project from Adobe, and I highly recommend it as the fastest and most reliable way to locally test dispatcher configurations for AMS projects.
This is a Dockerized Apache Dispatcher environment maintained by Adobe.
It's pre-configured with a working dispatcher image and is easier to use than setting up Apache and Dispatcher modules manually.
You can mount your AMS-style dispatcher configs into it and test locally.
This is probably your best bet if you're comfortable using Docker.
Important: The repo contains a sample
folder with default dispatcher configs.
Make sure to update these sample configs with your AMS-specific changes, because these are the configs actually used by the Docker container when it runs.
So instead of adding new config paths, go inside the sample
folder and modify:
/conf.dispatcher.d
→ Update farms, rewrites, filters, etc.
/htdocs
→ Place any static/error pages here if needed
You can also mount your own volume over the sample
folder if you want to keep configs outside the container repo
This will spin up the dispatcher container using the configs in the sample
directory.
Hope that helps!
Hi @Luca_Moreau,
AEM Cloud SDK is designed for AEM as a Cloud Service and has Dispatcher tools/configs optimized for Cloud Service environments, which differ significantly from AMS setups (e.g., versioning, Apache 2.4 vs. 2.2 compatibility, legacy modules, etc.).
I recently used the aem-dispatcher-docker project from Adobe, and I highly recommend it as the fastest and most reliable way to locally test dispatcher configurations for AMS projects.
This is a Dockerized Apache Dispatcher environment maintained by Adobe.
It's pre-configured with a working dispatcher image and is easier to use than setting up Apache and Dispatcher modules manually.
You can mount your AMS-style dispatcher configs into it and test locally.
This is probably your best bet if you're comfortable using Docker.
Important: The repo contains a sample
folder with default dispatcher configs.
Make sure to update these sample configs with your AMS-specific changes, because these are the configs actually used by the Docker container when it runs.
So instead of adding new config paths, go inside the sample
folder and modify:
/conf.dispatcher.d
→ Update farms, rewrites, filters, etc.
/htdocs
→ Place any static/error pages here if needed
You can also mount your own volume over the sample
folder if you want to keep configs outside the container repo
This will spin up the dispatcher container using the configs in the sample
directory.
Hope that helps!
Hi @SantoshSai
I have tried all the command which is mentioned here: https://github.com/adobe/aem-dispatcher-docker
But throwing this below error when I start the dispatcher in the container
httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.modules.d/02-dispatcher.conf: Cannot load modules/mod_dispatcher.so into server: /etc/httpd/modules/mod_dispatcher.so: cannot open shared object file: No such file or directory
Appreciate your help if you point me to the solution.
Views
Replies
Total Likes
@Luca_Moreau May I know, what options are you using this container for? I believe you wanted to setup for local - I would recommend to go for "Mount a local directory" in this case you have to follow below script as it mentioned on the page
cd _your_project_/dispatcher
mkdir logs
docker run -p 80:8080 -p 443:8443 -itd --rm --name dispatcher --env-file scripts/env.sh \
--mount type=bind,src=$(pwd)/src/conf,dst=/etc/httpd/conf,readonly=true \
--mount type=bind,src=$(pwd)/src/conf.d,dst=/etc/httpd/conf.d,readonly=true \
--mount type=bind,src=$(pwd)/src/conf.dispatcher.d,dst=/etc/httpd/conf.dispatcher.d,readonly=true \
--mount type=bind,src=$(pwd)/src/conf.modules.d,dst=/etc/httpd/conf.modules.d,readonly=true \
--mount type=bind,src=$(pwd)/logs,dst=/var/log/httpd \
--mount type=tmpfs,dst=/tmp \
dispatcher
Following
./dispatcher-mount
Ok everything looks good to me dispatcher started, but when I hit localhost:8080 with page url it doesn't show anything.
Views
Replies
Total Likes
If you read the README.md it clearly mentioned: The default publish host has been set to publish.docker.local
and the default renderer is set to host.docker.internal:4503
which should point to the AEM instance running on your local computer.
So, it should be http://publish.docker.local/content/we-retail/ca/en.html or depends on your virtualhosts entry.
@SantoshSai - Ohh yeah, it worked! Thank you so much for your help! I truly appreciate the quick responses and efforts you put in - it took a lot to make it work.
Views
Replies
Total Likes
Views
Likes
Replies