Forum Moderators: phranque

Message Too Old, No Replies

problem with documentroot

         

anthrt

11:10 pm on Sep 23, 2005 (gmt 0)

10+ Year Member



i have set up virtualhosts on my server. one is the root of the server, the 2nd is a seperate domain (document root is /var/www/domain) and the last one has the document root set at /var/www/domain2
the problem is, the 2nd virtualhost, which has the documentroot set to /var/www/domain2 is currently going to /var/www/html which is the document root of the server itself.

this is the virtualhosts section of httpd.conf

<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot /var/www/html/
ServerName root
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/domain/
ServerName domain.com
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /var/www/domain2/
ServerName domain2.com
</VirtualHost>

when domain2.com is accessed, the files in /var/www/html are displayed instead of /var/www/domain2/