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

I have added two different virtual hosts on Apache:

<VirtualHost *:80>

DocumentRoot /home/domain1/www

ServerName domain1.kz

ServerAlias www.domain1.kz

</VirtualHost *:80>

<VirtualHost *:80>

DocumentRoot /home/domain2/www

ServerName domain2.kz

ServerAlias domain2.kz

</VirtualHost *:80>

When I visit domain2.kz, it shows the content of first virtual host, even if their DocumentRoot are different? Why?

share|improve this question

1 Answer 1

Well, for a start, your closing tags aren't, so you might want to fix those up and try again. They should look like </VirtualHost>, without the listen spec.

share|improve this answer

Your Answer

 
discard

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