Hello. While upgrading from Apache 2.2 to 2.4, I've discovered a problem with the Apache Haus VC9 build of Apache 2.4.12 which does not exist in other Windows binary builds of Apache. Apparently, Apache Haus is enabling VirtualHosts by default, and this causes the main DocumentRoot declaration to be overwritten in the httpd-vhosts.conf file.
I use a dedicated partition of my SSD to host my DocumentRoot. Upon installation, I changed my DocumentRoot in the httpd.conf file from "${SRVROOT}/htdocs" to "W:/", and updated the directory permissions for "W:/" accordingly.
The server insisted on defaulting to "${SRVROOT}/htdocs" and kept showing me the default Welcome page. I eventually found out that the VirtualHosts file is being included at the end of the main config file, resulting in the DocumentRoot being overwritten, as follows:
<VirtualHost _default_:80>
DocumentRoot "${SRVROOT}/htdocs"
#ServerName www.example.com:80
</VirtualHost>
Therefore, it is necessary to copy a custom DocumentRoot setting into both config files for it to work. As I've never used VirtualHosts before, this took me a few hours to figure out.
When searching the Internet for assistance, I discovered that other people having this issue were all using a Windows version of Apache. I then checked some other Windows builds and found that only the Apache Haus version has this issue. Either the installation instructions should be updated to take the default VirtualHosts setting into account, or the config files should be updated to avoid the duplicate DocumentRoot declaration.
Thanks!