by ajax » 02. December 2018 17:20
For troubleshooting I returned to the original (out of the box so to speak) xampp configuration and verified that apache would start without the subject error. The only change that I then made to the original xampp configuration is to add my virtual host to "D:\xampp\apache\conf\extra\httpd-vhosts.conf" as shown below, which produces the error when starting apache.
I can find only one place in the apache configuration (HTTPD.CONF) which contains the string "xampp/apache" and it follows:
#
Define SRVROOT "/xampp/apache"
ServerRoot "/xampp/apache"
#
Is it possible that there is some circumstance under which ServerRoot is used for DocumentRoot? That appears to be what is happening.
***Following is my revised version of "D:\xampp\apache\conf\extra\httpd-vhosts.conf" ***
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "/xampp/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>
#DG-> Virtual host for project=mydomain.com
<VirtualHost *:80>
DocumentRoot "mydomain.com"
ServerName mydomain.com
ErrorLog "logs/error.log"
CustomLog "logs/access.log" combined
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "mydomain.com">
#ErrorDocument 404 /PageNotFound.php
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</VirtualHost>