How to setup multiple domains on AEM as a cloud service on dispatcher

220 Views Asked by At

I want to set up a multiple domain in aem as a cloud service how can i achieve this. I have create a two vhost and two rewrite files but only one vhost is get accesible

Is any one have done this configuration please provide support for this

1

There are 1 best solutions below

0
Ameesh Trikha On

For AEMaaCS, you define vhost settings in src/conf.d/available_vhosts and create a symlink under src/conf.d/enabled_vhosts

There is then default.vhost which is catch all configurations i.e if you dont have domain based vhost defined, it will be rendered by default.vhost.

These files are included in alphabetical order, so if for example you name your files as asite.vhost and siteb.vhost, the order in which the files will be included is asite.vhost, default.vhost and last siteb.vhost. In this case any request for siteb will be handled by default.vhost.

In most of mine multisite dispatcher configurations, I use 00_<site 1>.vhost, 00_<site2>.vhost to ensure that my sites are loaded before default.vhost.

In case this is not the case for you, can you share your configurations.