|  | 2 years ago | |
|---|---|---|
| .. | ||
| src | 2 years ago | |
| README.md | 2 years ago | |
| assembly.xml | 2 years ago | |
| pom.xml | 2 years ago | |
		
			
				
				README.md
			
		
		
	
	Dispatcher configuration
This module contains the basic dispatcher configurations. The configuration gets bundled in a ZIP file, and can be downloaded and unzipped to a local folder for development.
File Structure
├── conf
│   ├── httpd.conf
│   └── magic
├── conf.d
│   ├── README
│   ├── autoindex.conf
│   ├── available_vhosts
│   │   ├── 000_unhealthy_author.vhost
│   │   ├── 000_unhealthy_publish.vhost
│   │   ├── aem_author.vhost
│   │   ├── aem_flush.vhost
│   │   ├── aem_health.vhost
│   │   ├── aem_lc.vhost
│   │   ├── aem_publish.vhost
│   │   └── ${appId}_publish.vhost
│   ├── dispatcher_vhost.conf
│   ├── enabled_vhosts
│   │   ├── aem_author.vhost -> ../available_vhosts/aem_author.vhost
│   │   ├── aem_flush.vhost -> ../available_vhosts/aem_flush.vhost
│   │   ├── aem_health.vhost -> ../available_vhosts/aem_health.vhost
│   │   └── ${appId}_publish.vhost -> ../available_vhosts/${appId}_publish.vhost
│   ├── logformat.conf
│   ├── remoteip.conf
│   ├── rewrites
│   │   ├── base_rewrite.rules
│   │   ├── ${appId}_rewrite.rules
│   │   └── xforwarded_forcessl_rewrite.rules
│   ├── security.conf
│   ├── userdir.conf
│   ├── variables
│   │   └── ams_default.vars
│   ├── welcome.conf
│   └── allowlists
│       └── 000_base_allowlist.rules
├── conf.dispatcher.d
│   ├── available_farms
│   │   ├── 000_ams_author_farm.any
│   │   ├── 001_ams_lc_farm.any
│   │   └── 999_ams_publish_farm.any
│   ├── cache
│   │   ├── ams_author_cache.any
│   │   ├── ams_author_invalidate_allowed.any
│   │   ├── ams_publish_cache.any
│   │   └── ams_publish_invalidate_allowed.any
│   ├── clientheaders
│   │   ├── ams_author_clientheaders.any
│   │   ├── ams_common_clientheaders.any
│   │   ├── ams_lc_clientheaders.any
│   │   └── ams_publish_clientheaders.any
│   ├── dispatcher.any
│   ├── enabled_farms
│   │   ├── 000_ams_author_farm.any -> ../available_farms/000_ams_author_farm.any
│   │   └── 999_ams_publish_farm.any -> ../available_farms/999_ams_publish_farm.any
│   ├── filters
│   │   ├── ams_author_filters.any
│   │   ├── ams_lc_filters.any
│   │   └── ams_publish_filters.any
│   ├── renders
│   │   ├── ams_author_renders.any
│   │   ├── ams_lc_renders.any
│   │   └── ams_publish_renders.any
│   └── vhosts
│       ├── ams_author_vhosts.any
│       ├── ams_lc_vhosts.any
│       └── ams_publish_vhosts.any
└── conf.modules.d
    ├── 00-base.conf
    ├── 00-dav.conf
    ├── 00-lua.conf
    ├── 00-mpm.conf
    ├── 00-proxy.conf
    ├── 00-systemd.conf
    ├── 01-cgi.conf
    └── 02-dispatcher.conf
Files Explained
- 
conf.d/available_vhosts/<CUSTOMER_CHOICE>.vhost- *.vhost(Virtual Host) files are included from inside the- dispatcher_vhost.conf. These are- <VirtualHosts>entries to match host names and allow Apache to handle each domain traffic with different rules. From the- *.vhostfile, other files like rewrites, white listing, etc. will be included. The- available_vhostsdirectory is where the- *.vhostfiles are stored and- enabled_vhostsdirectory is where you enable Virtual Hosts by using a symbolic link from a file in the- available_vhoststo the- enabled_vhostsdirectory.
 The ${appId}_publish.vhostfile is an updated version of the defaultams_publish.vhost, the changes allow for including additional rewrite files.
- 
conf.d/rewrites/*.rules- base_rewrite.rules: included from inside the- conf.d/enabled_vhosts/*.vhostfiles. It has a set of default AMS rewrite rules for- mod_rewrite.
- ${appId}_rewrite.rules: included from the the- conf.d/enabled_vhosts/${appId}_publish.vhostfile. It sets up default rewrite rules for root page resolution. Additional rewrite rules are provided to expand resource mapping paths.
 
- 
conf.d/variables/ams_default.vars- ams_default.varsfile is included from inside the- conf.d/enabled_vhosts/*.vhostfiles. You can put your Apache variables here.
 
- 
conf.dispatcher.d/available_farms/<CUSTOMER_CHOICE>.farm- *.farmfiles are included inside the- conf.dispatcher.d/dispatcher.anyfile. These parent farm files exist to control module behavior for each render or website type. Files are created in the- available_farmsdirectory and enabled with a symbolic link into the- enabled_farmsdirectory.
 
- 
conf.dispatcher.d/filters/filters.any- filters.anyfile is included from inside the- conf.dispatcher.d/enabled_farms/*.farmfiles. It has a set of rules change what traffic should be filtered out and not make it to the backend.
 
- 
conf.dispatcher.d/virtualhosts/virtualhosts.any- virtualhosts.anyfile is included from inside the- conf.dispatcher.d/enabled_farms/*.farmfiles. It has a list of host names or URI paths to be matched by blob matching to determine which backend to use to serve that request.
 
- 
conf.dispatcher.d/cache/rules.any- rules.anyfile is included from inside the- conf.dispatcher.d/enabled_farms/*.farmfiles. It specifies caching preferences.
 
- 
conf.dispatcher.d/clientheaders.any- clientheaders.anyfile is included inside the- conf.dispatcher.d/enabled_farms/*.farmfiles. It specifies which client headers should be passed through to each renderer.
 
Environment Variables
- CONTENT_FOLDER_NAME- This is the customer's content folder in the repository. This is used in the customer_rewrite.rulesto map shortened URLs to their correct repository path.
 
- This is the customer's content folder in the repository. This is used in the 
Immutable Configuration Files
Some files are immutable, meaning they cannot be altered or deleted.  These are part of the base framework and enforce standards and best practices.  When customization is needed, copies of immutable files (i.e. ams_author.vhost -> customer_author.vhost) can be used to modify the behavior.  Where possible, be sure to retain includes of immutable files unless customization of included files is also needed.
Immutable Files
conf/httpd.conf
conf.d/dispatcher_vhost.conf
conf.d/logformat.conf
conf.d/security.conf
conf.d/available_vhosts/aem_author.vhost
conf.d/available_vhosts/aem_publish.vhost
conf.d/available_vhosts/aem_lc.vhost
conf.d/available_vhosts/aem_flush.vhost
conf.d/available_vhosts/aem_health.vhost
conf.d/available_vhosts/000_unhealthy_author.vhost
conf.d/available_vhosts/000_unhealthy_publish.vhost
conf.d/rewrites/base_rewrite.rules
conf.d/rewrites/xforwarded_forcessl_rewrite.rules
conf.d/allowlists/000_base_allowlist.rules
conf.modules.d/02-dispatcher.conf
conf.dispatcher.d/dispatcher.any
conf.dispatcher.d/available_farms/000_ams_author_farm.any
conf.dispatcher.d/available_farms/999_ams_publish_farm.any
conf.dispatcher.d/available_farms/001_ams_lc_farm.any
conf.dispatcher.d/cache/ams_author_cache.any
conf.dispatcher.d/cache/ams_author_invalidate_allowed.any
conf.dispatcher.d/cache/ams_publish_cache.any
conf.dispatcher.d/cache/ams_publish_invalidate_allowed.any
conf.dispatcher.d/clientheaders/ams_author_clientheaders.any
conf.dispatcher.d/clientheaders/ams_publish_clientheaders.any
conf.dispatcher.d/clientheaders/ams_common_clientheaders.any
conf.dispatcher.d/clientheaders/ams_lc_clientheaders.any
conf.dispatcher.d/filters/ams_author_filters.any
conf.dispatcher.d/filters/ams_publish_filters.any
conf.dispatcher.d/filters/ams_lc_filters.any
conf.dispatcher.d/renders/ams_author_renders.any
conf.dispatcher.d/renders/ams_publish_renders.any
conf.dispatcher.d/renders/ams_lc_renders.any
conf.dispatcher.d/vhosts/ams_author_vhosts.any
conf.dispatcher.d/vhosts/ams_publish_vhosts.any
conf.dispatcher.d/vhosts/ams_lc_vhosts.any