For new domains you create, you can have Virtualmin automatically generate alias domains like this by going into System Settings -> Server Templates -> Default -> Virtual Server Creation -> Automatically create alias domain.

For example: mydomain.com would create mydomain.com.otherdomain.com

That works pretty well. If you now create a subserver as well, then Virtualmin creates two folders in the domains folder: subserver.mydomain.com and subserver.mydomain.com.otherdomain.com

Why would virtualmin create two folders? Could this be a bug?

Status: 
Closed (fixed)

Comments

Actually that is expected .. each domain typically has a directory under domains , so for your sub-domain an equivalent alias domain is also created.

Alias domains get a home directory folder? I'm not sure if this is really intended. :)

Yes, I also asked mself why a ServerAlias needs a home directory.

It is potentially needed as you can have an alias domain with email aliases, one of which could be an auto-responder, and the text file for that responder needs to be saved in the alias domain's directory.

Thanks for the explanation!

I took another look at the code, and in fact the alias domain directory isn't needed most of the time, because by default aliase domains can't have extra email aliases. I will fix this in the next Virtualmin release (3.88).

Ok, great. So it is safe to delete those folders, right?

No .. don't delete them, as Virtualmin currently expects them to exist.

Automatically closed -- issue fixed for 2 weeks with no activity.