Dispatcher in the Cloud Dispatcher-in-the-cloud
Introduction apache-and-dispatcher-configuration-and-testing
This page describes the Dispatcher tools and how to download and extract them, the supported Apache modules and provides a high-level overview of the legacy and flexible modes. Also, there are further references on validation and debugging and migrating the Dispatcher configuration from AMS to AEM as a Cloud Service.
Dispatcher Tools dispatcher-sdk
The Dispatcher Tools are part of the overall AEM as a Cloud Service SDK and provide:
- A vanilla file structure containing the configuration files to include in a maven project for Dispatcher.
- Tooling for customers to validate that the Dispatcher configuration includes only AEM as a Cloud Service-supported directives. Also, the tooling also validates that the syntax is correct so Apache can start successfully.
- A Docker image that brings up the Dispatcher locally.
Downloading and Extracting the Tools extracting-the-sdk
The Dispatcher Tools, part of the AEM as a Cloud Service SDK, can be downloaded from a zip file at the portal. Any new configuration available in that new Dispatcher Tools version can be used to deploy to Cloud environments running that version of AEM in the Cloud or higher.
Unzip the SDK, which bundles Dispatcher Tools for macOS, Linux® and Windows.
For macOS/Linux, make the Dispatcher tool artifact executable and run it. It self-extracts the Dispatcher Tools files underneath the directory that you stored it to (where version
is the version of the Dispatcher Tools).
$ chmod +x aem-sdk-dispatcher-tools-<version>-unix.sh
$ ./aem-sdk-dispatcher-tools-<version>-unix.sh
Verifying archive integrity... 100% All good.
Uncompressing aem-sdk-dispatcher-tools-<version>-unix.sh 100%
For Windows, extract the Dispatcher Tooling zip archive.
Validation and Debugging using the Dispatcher Tools validation-debug
The Dispatcher tools are used to validate and debug your project’s Dispatcher configuration. Learn more about how to use those tools in the pages referenced below, based on whether your project’s Dispatcher configuration is structured in flexible mode or legacy mode:
-
Flexible mode - the recommended mode, and the default for AEM archetype 28 and higher, which is also used by Cloud Manager for new environments created after the Cloud Manager 2021.7.0 release. Customers can activate this mode by adding the folder and file
opt-in/USE_SOURCES_DIRECTLY
. By using this more flexible mode, there are no limitations in the file structure under the rewrites folder that in legacy mode required a singlerewrite.rules
file. Also, there is no limitation on the number of rules you can add. For details on folder structure and local validation, see Validating and Debugging using Dispatcher Tools. -
Legacy mode - for details on the folder structure and local validation for Dispatcher configuration legacy mode, see Validating and Debugging using Dispatcher Tools (Legacy)
For more information on how to migrate from the legacy configuration model to the more flexible one, provided with AEM archetype 28 onwards, see this documentation.
Content Disposition content-disposition
For the publish tier, the default for serving blobs is as an attachment. Override this setting using the standard in the Dispatcher.
Below is an example of how the configuration should look like:
<LocationMatch "^\/content\/dam.*\.(pdf).*">
Header unset Content-Disposition
Header set Content-Disposition inline
</LocationMatch>
Supported Apache Modules supported-directives
The table below shows the supported Apache modules:
core
mod_access_compat
mod_alias
mod_allowmethods
mod_authn_core
mod_authn_file
mod_authz_core
mod_authz_groupfile
mod_deflate
mod_dir
mod_env
mod_filter
mod_headers
mod_mime
mod_proxy
mod_proxy_http
mod_remoteip
mod_reqtimeout
mod_rewrite
mod_security
mod_setenvif
mod_ssl (only the SSLProxyEngine directive)
mod_substitute
mod_userdir
mod_macro
mod_include (no directives supported)
Customers cannot add arbitrary modules, however additional modules may be considered for inclusion in the future. Customers can find the list of directives available for a given Dispatcher version by executing validator’s allowlist command in the SDK.
The directives allowed in Apache configuration files can be listed by running the validator’s allowlist command:
$ validator allowlist
Cloud manager validator 2.0.4
Allowlisted directives:
<Directory>
...
Folder Structure folder-structure
The project’s Apache and Dispatcher folder structure differ slightly based on which mode that the project is using, as described in the Validation and Debugging using the Dispatcher Tools section above.
Migrating the Dispatcher configuration from AMS ams-aem
For details on how to migrate the Dispatcher configuration from AMS to AEM as a Cloud Service, see the Migrating the Dispatcher configuration from AMS to AEM as a Cloud Service page.