Mobile app version of vmapp.org
Login or Join
BetL925

: Default Apache webroot different to what I expect; seems to be /var/www/html rather than /var/www I have a new installation of Apache in Ubuntu 14.04.2 The /etc/apache2/apache2.conf file contains:

@BetL925

Posted in: #Apache #Linux #Ubuntu

I have a new installation of Apache in Ubuntu 14.04.2

The /etc/apache2/apache2.conf file contains:

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


With this setting, it would make sense to me if the webroot was /var/www/ but based on behaviour (when I try to access it through a browser) it seems to be /var/www/html/

Why does it use the html subfolder?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @BetL925

1 Comments

Sorted by latest first Latest Oldest Best

 

@Hamm4606531

The file 000-default.conf in /etc/apache2/sites-available/ defines the /var/www/html/ folder as the webroot (this is enabled by default, as you can see in the /etc/apache2/sites-enabled/ folder):

<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 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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme