Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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:

127.0.0.1 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.

Any help would be very appreciated

share|improve this question

1 Answer 1

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

 
discard

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.