Our current setup has a set of dispatcher config files for our stage environment (only stage domains, rewrites, etc), and a different set for our prod environment. In moving over to the Cloud Manager for deployments, it looks like we only get one subdirectory/module for the dispatcher. Does this mean we need to merge these two different sets of configs together?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @a74048191r
With Cloud Manager in picture, the apache/dispatcher files are maintained in code, which means you will have to keep one set of files. You can have domain specific rewrites if general rewrites does not work lwith rewrite conditions like:
RewriteCond %{HTTP_HOST} ^myproject-stg\.mycompany\.com$
OR
RewriteCond %{HTTP_HOST} ^myproject-prod\.mycompany\.com$
Also, Use environment variables for dispatcher renderers IP etc like
/0 {
/hostname "${PUBLISH_IP}"
/port "${PUBLISH_PORT}"
/timeout "10000"
}
Read more from documentation specifying role of each file maintained. https://docs.adobe.com/content/help/en/experience-manager-cloud-manager/using/getting-started/dispat...
Hope it helps!
Thanks!
Nupur
@a74048191r From your question, i see that you are using Cloud manager to deploy dispatcher files, here are the few pointers:
Hi @a74048191r,
Upon deployment to a dispatcher Instance, the contents of two directories - conf and conf.d will overwrite the contents of these directories on the Dispatcher instance. Since web server and Dispatcher configuration files frequently require environment-specific information, in order for this capability to be used correctly, you will first need to work with your Customer Success Engineers (CSE) to set these environment variables in /etc/sysconfig/httpd.
Thanks!!
Hi @a74048191r
With Cloud Manager in picture, the apache/dispatcher files are maintained in code, which means you will have to keep one set of files. You can have domain specific rewrites if general rewrites does not work lwith rewrite conditions like:
RewriteCond %{HTTP_HOST} ^myproject-stg\.mycompany\.com$
OR
RewriteCond %{HTTP_HOST} ^myproject-prod\.mycompany\.com$
Also, Use environment variables for dispatcher renderers IP etc like
/0 {
/hostname "${PUBLISH_IP}"
/port "${PUBLISH_PORT}"
/timeout "10000"
}
Read more from documentation specifying role of each file maintained. https://docs.adobe.com/content/help/en/experience-manager-cloud-manager/using/getting-started/dispat...
Hope it helps!
Thanks!
Nupur
How would you use environment variables to let's say disable cache for your dev environment. Does this apply to AEM as a cloud service or only AMS.
cc: @Deleted Account
Views
Replies
Total Likes
I think, you can use Environment variables to setup different dispatcher file for different environments.
like
<IfModule disp_apache2.c>
## location of the configuration file. eg: 'conf/dispatcher.any'
<If "req('Host') != 'stage'"> // or some other condition
DispatcherConfig conf.dispatcher.d/dispatcher_stg.any
</If>
<Else>
DispatcherConfig conf.dispatcher.d/dispatcher.any
</Else>
.
.
.
</IfModule disp_apache2.c>
Views
Replies
Total Likes
hi folks,
I have the same issue and I'm following this thread.
If I put this in /etc/sysconfig/httpd, DISP_RUN_MODE="dev", can I use it in the
<IfModule disp_apache2.c> section of dispatcher_vhost.conf ?
I made 3 /etc/conf.d/variables/ var files ending in .dev.vars, ...stage.vars, ...prod.vars
I want to Include one of the files depending on DISP_RUN_MODE. Should I use <IfDefine> or <If> ? Are there any other apache modules I need for this to work? Do I need to use PassEnv ?
thanks
Fiona
Views
Replies
Total Likes