I have various virtual hosts for my web development work, including cnm. The
sites-available/cnm
my file says very simply:
<VirtualHost *:80>
ServerName cnm
DocumentRoot /var/www/cnm/public_html
</VirtualHost>
I upgraded to Ubuntu 13.10, and when I point my browser to cnm/, I see the /var/www/index.html file that seems to be indicated in the default file
sites-available/000-default.conf
which says (among other things):
<VirtualHost *:80>
DocumentRoot /var/www
What do I need to do to get Apache to read my cnm document root when I browse to cnm/ ?
NOTES:
I already tried renaming my sites-available/cnm file to sites-available/cnm.conf and enabling it with
a2ensite cnm
andservice apache2 reload
. That is a good thing, but it changes nothing.I already tried changing
<VirtualHost *:80>
to<VirtualHost cnm.localhost>
or to<VirtualHost cnm>
. That did nothing.
I found the answer to this issue:
When upgrading to
Ubuntu 13.10
, theDocumentRoot
does not seem to make a difference.This is because Apache 2.4 moved the Directory configuration somewhere else. Your old
.conf
files still have these lines:Remove (or comment out) the
<Directory>
directives so you only have:Now reload your settings:
service apache2 reload
andDocumentRoot
is back. :)