The deafult Apache 2.4 installation has the default virtual host 000-default.conf in /etc/apache2/sites-available. I've created configuration file for my virtual host example.com. How can I now make example.com default virtual host, i.e. all requests should be processed by example.com? Thanks!

1 Answer 1


I assume by default you mean what users will see when they visit your apache server through whatever means. You can achieve this by simply putting all the files which make up example.com in the root of apache. This is the www folder found in /var/www where the default apache page lives (the index.html file)

With your newly created sites available file point it's root at the /var/www directory and enable the site with a2ensite example.com or whatever you called your file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .