AEM: Understanding VirtualHost and Forms Evaluation Priority in AEM Dispatcher

Shankar Angadi
3 min read3 days ago

Non members can access from here

In AEM Dispatcher, the /virtualhosts configuration is crucial for routing incoming requests to the appropriate dispatcher farm. This configuration defines which hostnames (and optionally, URIs and schemes) are associated with specific farms. The dispatcher evaluates these virtual hosts to determine which farm's rules (like caching, filters, and rendering) should be applied to the request.

1. /virtualhosts Configuration Format

The /virtualhosts configuration uses a specific format to define which requests should be handled by a particular farm. Here's the structure:

  • [scheme]host[uri][*]:
  • scheme (Optional): Specifies the protocol (http:// or https://). If omitted, both HTTP and HTTPS are considered.
  • host: Defines the hostname or IP address, potentially including a port number.
  • uri (Optional): Specifies a path to target specific resources on the server.
  • *: Wildcards can be used to match multiple subdomains or paths.

Example Configuration

/virtualhosts {
"www.examplecorp.com"
"www.examplecorp.de"
"www.exampleSubsidiary.*"
}

2. Dispatcher Evaluation Process

--

--