Cloud Manager - dispatcher config deploy for different environments



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?  

cloud manager Configuration Dispatcher

Accepted Solutions (1)

Accepted Solutions (1)




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$

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.


Hope it helps!



Answers (3)

Answers (3)




I think, you can use Environment variables to setup different dispatcher file for different environments.




<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
 DispatcherConfig conf.dispatcher.d/dispatcher.any
</IfModule disp_apache2.c>





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.


Please follow the steps below to complete the initial process:
  1. Obtain current production configuration files from your CSE.
  2. Remove hard-coded environment-specific data (for example, publish renderer IP) and replace with variables.
  3. Define required variables in key-value pairs for each target Dispatcher and request your CSE to add to /etc/sysconfig/httpd on each instance.
  4. Test the updated configurations on your stage environment, then request your CSE to deploy to production.
  5. Commit files to Git Repository .
  6. Deploy through Cloud Manager.





@a74048191r From your question, i see that you are using Cloud manager to deploy dispatcher files, here are the few pointers:

  • You should not hardcode any domains specific to environment either in dispatcher or apache files. Everything has to be driven from environment variables.
  • Speak to your AMS CSE to help you with environment variables.
  • Rewrite rules or other filters/configurations should be same for Stage and Production.