In Debian there are a bunch of Apache environment variables, but none for the document root.
/usr/sbin/apachectl does is:
APACHE_CONFDIR and set it to default value
/etc/apache2 if not set.
APACHE_ENVVARS (the environment variable file) and set it to default value
"$APACHE_CONFDIR/envvars" if not set. this file is then sourced.
APACHE_ARGUMENTS to include the path to the config directory if it was overridden.
set default path to the binary
set a few other variables...
The default environment variable file contains these variables:
root@x250:/# grep export /etc/apache2/envvars
#export APACHE_LYNX='www-browser -dump'
So you could
- add variable "
/etc/apache2/envvars and modify your *.conf files
- or smuggle in your path through
APACHE_ARGUMENTS and check it/set it in your modified *.conf with
- or change the config directory
APACHE_CONFDIR to a different path
- or include a config file for a
<VirtualHost> with a different
- or symlink
/var/www/html to a different directory
There are so many options! And honestly, I don't really think the debian guys will change
/var/www/html in the near future. Why would they?
But if they do, you will probably see something like
This is the default welcome page used to test the correct operation of the Apache2 server after installation on Debian systems.
If you can read this page, it means that the Apache HTTP server installed at this site is working properly. You should replace this file (located at /xxx/yyy/html/index.html) before continuing to operate your HTTP server.
Sorry, I can't tell how it's done in nginx.