I'm using apache http server 2.4 on debian 8.

I seem to recall from a few years ago that if you wanted to have virtual hosts, you have to enable this by adding a line to your main apache config file. Has this changed?

I can't seem to find that line in the main config file and yet the 000-default.conf virtual host is working.

I just wanted to confirm, are virtual hosts now enabled by default in this version of apache?


The use of vhosts is enabled by default, you can create new vhosts in /etc/apache2/sites-available/ and enable it by using a2ensite <vhostfile name>.

This will create a symlink from /etc/apache2/sites-enabled/ to the corresponding vhost in sites-available.

Note that in jessie vhosts should end in .conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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