Is it possible that mod_vhost_alias can read several directories (For example, each users) to find the sites? Like in a hosting setup where different users can create the directories in their home directory?
Is it possible that mod_vhost_alias can read several directories (For example, each users) to find the sites? Like in a hosting setup where different users can create the directories in their home directory?
vhost_alias maps a domain received into a path on the filesystem. It doesn't read the existing filesystem prior to serving the request to see if the files exist.
However, you can do something like have a stable directory listing of files, and use symlinks or bind mounts in the user directories to point to the actual web directories.
/var/www/domain.com /var/www/domainb.com
and then
/home/user/domain.com is a symlink or bind mount to /var/www/domain.com /home/userb/domainb.com is a symlink/bind mount to /var/www/domainb.com
Remember that mod_vhost_alias runs everything as the user running the apache service. In a shared environment, make sure you know the ramifications for running apache like this.