Apache Configuration file 000-default.conf not working

Apache ignores sites-available until you enable the site (in which case it symlinks it in sites-enabled).

Run the following commands:

sudo a2dissite 000-default
sudo a2ensite 000-default
sudo systemctl restart apache2

This will disable the "Default" site, enable the "Default" site, and then the restart of Apache will refresh the configuration and should then use the updated docroot accordingly. Note there may be other permissions issues not discussed here; you would need to open a new question for that.


None of the above solutions worked for me. No matter what I tried I could not get the default site to load including copying the config from my 14.04 VPS where it is working 100% (I am upgrading to 18.04).

In the end adding a VirtualHost for the local server name to my apache2.conf forcing it to be the first VirtualHost defined worked. It's not my preferred solution, but it worked:

<VirtualHost webserver.mydomain.za:80>
  ServerAdmin   [email protected]
  ServerName    webserver.mydomain.za
  DocumentRoot  /var/www/nowebsite
  ErrorLog      ${APACHE_LOG_DIR}/error.log
  CustomLog     ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>`

Strangely enough, the default SSL site worked the first time.