Apache mod_vhost_alias module fails to set DOCUMENT_ROOT
Mass virtual hosting using mod_vhost_alias or mod_rewrite module simplifies pattern-based virtual hosting. However, there is a major problem if your virtual host application makes use of the DOCUMENT_ROOT environment variable. According to the Apache documentation, the mod_vhost_alias does NOT correctly set the DOCUMENT_ROOT variable and hence potentially breaks PHP web applications that make use of this environment variable. It seems that one logical thing to do is to use the VirtualDocumentRoot to map the DOCUMENT_ROOT variable, but current mod_vhost_alias does NOT implement this function and it is very unlikely that it will any time soon.