web-dev-qa-db-fra.com

La racine web Apache par défaut diffère de ce à quoi je m'attendais; semble être / var / www / html plutôt que / var / www

J'ai une nouvelle installation d'Apache dans Ubuntu 14.04.2

Le fichier /etc/Apache2/Apache2.conf contient:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

Avec ce paramètre, il serait logique pour moi si la racine Web est/var/www/mais en fonction du comportement (lorsque j'essaie d'y accéder via un navigateur), il semble que ce soit/var/www/html /

Pourquoi utilise-t-il le sous-dossier html?

1
Highly Irregular

Le fichier 000-default.conf dans/etc/Apache2/sites-available/définit le dossier/var/www/html/comme racine Web (activé par défaut, comme vous pouvez le voir dans le fichier/etc/Apache2/sites- activé/dossier):

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual Host. For the default virtual Host (this file) this
        # value is not decisive as it is used as a last resort Host regardless.
        # However, you must set it for any further virtual Host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${Apache_LOG_DIR}/error.log
        CustomLog ${Apache_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual Host. For example the
        # following line enables the CGI configuration for this Host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=Apache ts=4 sw=4 sts=4 sr noet
1
Highly Irregular