httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Avery" <schr...@dayzed.com>
Subject [users@httpd] VirtualHost (frustrated out of my mind)
Date Thu, 08 Jul 2004 20:50:56 GMT
Could someone please help me I cant get Virtual hosting to work right. I have read through
all of the documents on
apache's website plus some other websites hanging around. Thanks.

I have 5 sites and I want each site to have its own webpage. I want these sites to be name
based VirtualHosts. I have
defined my 5 domains in my httpd.conf file. I also added these 5 domains to my hosts file.
Here is the problem, I cant
get each virtual host to use a different index.html file. All of the hosts want to use the
same index.html file. Here
is the first VirtualHost entry
----------------------
<VirtualHost *>
    ServerAdmin webmaster@domain1.com
    DocumentRoot /var/www/html/domain1.com
    ServerName domain1.com:80
#    ErrorLog logs/var/www/html-error_log
#    CustomLog logs/var/www/html-access_log common
</VirtualHost>
----------------------
I created a /var/www/html/domain1.com/default.html file. I point my browser to www.domain1.com.
This works fine, It is
serving up the document /var/www/html/domain1.com/default.html
Now I want to add my second VirtualHost so I add in my second one to httpd.conf like this
----------------------
<VirtualHost *>
    ServerAdmin webmaster@domain2.com
    DocumentRoot /var/www/html/domain2.com
    ServerName domain2.com:80
#    ErrorLog logs/var/www/html-error_log
#    CustomLog logs/var/www/html-access_log common
</VirtualHost>
----------------------
OK I restart the server and copy over my /var/www/html/domain1.com/index.html to /var/www/html/domain2.com/index.html
and change the contents of the file to something distinguishable  from the other index file
in
/var/www/html/domain1.com/index.html.

I then point my browser to www.domain2.com and I am getting the index file from the directory
/var/www/html/domain1.com Should I be seeing the index file from /var/www/html/domain2.com.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message