0

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!

0

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.