Right now the subdomain detection logic assumes that the document root for each subdomain lives under a single directory. For example, if SUBDOMAIN_ROOT is /var/www/vhosts, then it would be assumed that foo.example.com would have it's document root at /var/www/vhosts/foo. This is obviously incorrect for many configurations and so inadequate in general.
This should be changed to allow for more configurations. This might mean turning this into an array, allowing regex or glob values, or something else.
Right now the subdomain detection logic assumes that the document root for each subdomain lives under a single directory. For example, if SUBDOMAIN_ROOT is
/var/www/vhosts
, then it would be assumed thatfoo.example.com
would have it's document root at/var/www/vhosts/foo
. This is obviously incorrect for many configurations and so inadequate in general.This should be changed to allow for more configurations. This might mean turning this into an array, allowing regex or glob values, or something else.