Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Once I tried to make a virtual host, and the problem was that if I make another file in /etc/apache2/sites-available/ that says

DocumentRoot /var/www/newsite
ServerName   newsite

Then save it, restart Apache, and appending /etc/hosts like this: newsite

I get the page that corresponds the DocumentRoot from /etc/apache2/sites-available/default

That time I left it unsolved. Now I want to do it once again and I get the same problem. Despite the fact that I use different version of Linux distro. I feel like I'm doomed.

share|improve this question
up vote 3 down vote accepted

did you enable the site using the a2ensite command? The /etc/apache2/sites-available directory lists those that you have setup but it needs to be in /etc/apache2/sites-enabled to be picked up when you next reload the apache2 configuration.

share|improve this answer
damn, that was easy! I don know why i didnt ever faced this command reading dozens of how to's and examples. Thank you so much – M2_ Jan 17 '11 at 23:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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