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

On my WAMP local Host I am running two different social engine websites, in my hosts file I added two lines:

in my apache.conf file I have added this code for virtual hosting

    DocumentRoot /wamp/www/se3
    ErrorLog logs/site1-error_log
    CustomLog logs/site1-access_log common
    DocumentRoot /wamp/www/site2
    ErrorLog logs/site2-error_log
    CustomLog logs/site2-access_log common

Now the problem which I am facing is, when on browser when I type it loads site1 correctly, but when I type it loads site1.

I can't find out the actual problem behind this.

Can any one help me out?


share|improve this question
up vote 2 down vote accepted

Have you got name based virtual hosting enabled with a NameVirtualHost directive somewhere?

eg: NameVirtualHost

share|improve this answer
in httpd.conf file their is no where written such line, should I add it? – ntechi Apr 7 '11 at 13:34
Yes, otherwise Apache will default to IP based virtual hosting where each virtual host will need to be on a separate IP address. – James Yale Apr 7 '11 at 13:39

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.