Server Fault is a question and answer site for system and network administrators. 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

I installed the Apache. I created a directory with the name of my site:


and I configured the virtualhosts:

<VirtualHost *:80>
    DocumentRoot /var/www/domain

When I access, the content appears not from the directory /var/www/domain, but from /var/www.


The problem was solved! Just add:

<directory /var/www/domain/htdocs>
    Options -Indexes

Thank you all!

share|improve this question
From the looks of it you've set '/var/www/incoreside' as the document root, but uploaded the content of your website to '/var/www/domain'. Unless of course you've forgotten to replace incoreside with domain in your example? – dannymcc Feb 7 '12 at 19:46
When I put the archives of my site in the paste '/var/www/domain'. The site no appears. – user2692786 Feb 7 '12 at 19:48
Have you restarted Apache after making changes to your virtual hosts file? – dannymcc Feb 7 '12 at 19:48
Restart apache. – Joel E Salas Feb 7 '12 at 19:49
One possibility is that the default VirtualHost block still exists (or some other conflicting VirtualHost). Use httpd -S to see how Apache parsed your configuration file. – cyberx86 Feb 7 '12 at 20:43
up vote 1 down vote accepted

Check if you have the correct NameVirtualHost directive:

NameVirtualHost *:80
share|improve this answer
Can you provide some details of what a "correct NameVirtualHost directive" may look like in the OP's config? – jscott Feb 7 '12 at 20:37
NameVirtualHost *:80 – yarek Feb 7 '12 at 20:45

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.