Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

this is my httpd.conf:

<VirtualHost *>
    ServerName domain1.com
    DocumentRoot /home/www/domain1
</VirtualHost>

<VirtualHost *>
    ServerName domain2.com
    DocumentRoot /home/www/domain2
</VirtualHost>

What is wrong when the browser always shows first entry - /home/www/domain1?

Thanks, Etam.

share|improve this question

1 Answer 1

Either:

a. You're missing the NameVirtualHosts settings: http://stackoverflow.com/questions/2530418/wamp-server-multiple-virtual-hosts-are-not-working-on-windows/2530518#2530518

or

b. the domain you're visiting matches domain1.com, or it doesn't match either (apache will default to the first one.)

or

c. the method/client you're using to visit the web page doesn't send the appropriate headers for the server name ('ancient' clients per the apache docs)

share|improve this answer
    
Begin from C point! –  lg. Jul 1 '10 at 8:35
    
Good Idea. Thanks. –  John Weldon Jul 1 '10 at 8:44

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.