In WAMP the files are served by the Apache component (the A in WAMP).
In Apache, by default the files served are located in the subdirectory htdocs
of the installation directory. But this can be changed, and is actually changed when WAMP installs Apache.
The location from where the files are served is named the DocumentRoot
, and is defined using a variable in Apache configuration file. The default value is the subdirectory htdocs
relative to what is named the ServerRoot
directory.
By default the ServerRoot
is the installation directory of Apache. However this can also be redefined into the configuration file, or using the -d
option of the command httpd
which is used to launch Apache. The value in the configuration file overrides the -d
option.
The configuration file is by default conf/httpd.conf
relative to ServerRoot
. But this can be changed using the -f
option of command httpd.
When WAMP installs itself, it modify the default configuration file with DocumentRoot c:/wamp/www/
. The files to be served need to be located here and not in the htdocs
default directory.
You may change this location set by WAMP, either by modifying DocumentRoot
in the default configuration file, or by using one of the two command line options -f
or -d
which point explicitly or implicity to a new configuration file which may hold a different value for DocumentRoot
(in that case the new file needs to contain this definition, but also the rest of the configuration found in the default configuration file).