Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

AEM Cloud: its ignoring all vhosts in enabled_vosts except default.vhost

Avatar

Level 9

This is strange. AEM displather has 2 dirs under conf.d:

available_vhosts

enabled_vhosts

 

What we have found is AEM ignores all xxx.vhosts files in enabled_vhosts except for one called default.vhost.

 

in avaliable_vhosts we have 3 xxx.vhost files

in enabled_vhosts we create a symbolic link to each.

only default.vhost is actually used.

 

Our workaround is to put all our vhosts in into default.vhost, but its not ideal.

 

Anyone else have this issue?

 

All our vhosts look like this:

 

<VirtualHost *:80>

ServerName "somesite_com"

ServerAlias "oursite-dev.ourdomain.net"

ServerAlias "oursite-test.ourdomain.net"

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Correct, zzz is in the C collation after 999 🙂

View solution in original post

4 Replies

Avatar

Level 9

Well, I found the problem, but not a real solution.  

the problem is that one of the vhosts had "ServerAlias *". Removing this, allows all our vhost files to be correctly read and used. However, now we are seing some strange inexplicable problems with our site, and one of the devs says the severalias * is required by adobe to work. This means, to ensure this directive is the very last one, we have to put all our many virtual hosts entries into one giant vhost file, and put the * allies on the last of them.  This means we cant use any of the nice available/enabled functionality - we have to edit the file to add/remove virtual hosts.

Avatar

Employee Advisor

That explanation is technically correct, but I just want to give some more context.

 

In this case the order matters. If a request comes in and the correct vhost is about to determined, a "ServerAlias *" is a catch-all definition, and it will be used. So you should make sure that this definition is the last one to be loaded. More specific vhosts should be loaded before.

 

So you can try to rename the "default.vhost" to "999_default.vhost" (alphabetical order matters here) and try again.

 

Would love to hear if this helps.

 

Jörg

 

Avatar

Community Advisor

@Jörg_Hoh - Changing the default.vhost to 999_default.vhost also didn't help - The default.vhost was loaded first. Changing it to zzz_default.vhost worked as that ensured the default.vhost is the last to be loaded.

Avatar

Correct answer by
Employee Advisor

Correct, zzz is in the C collation after 999 🙂