httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carper" <scarpe...@comcast.net>
Subject RE: [users@httpd] VirtualHost (frustrated out of my mind)
Date Wed, 11 Aug 2004 05:38:39 GMT
This config worked for me also, when the example config in the apache2
docs ("NameVirtualHost *:80" with "VirtualHost *:80" entires beneath)
did not.
Can anyone explain to me WHY this works?  
I'm glad it works, but I'd REALLY like to know why it works.

Thanks.

Scott

-----Original Message-----
From: Avery [mailto:schrock@dayzed.com] 
Sent: Thursday, July 08, 2004 10:29 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] VirtualHost (frustrated out of my mind)


aman,

I finally got it to work thanks for your help here is what I did.
------------------------------------------
I needed to have these 2 entrys
NameVirtualHost 192.168.50.9:80   (this entry goes just above all of the
virtual domains)
ServerName domain1.com:80   (this is my main site domain)
I then needed to duplicated my main site domain in the virtualdomains as
the first site with the machines IP address as shown below. The second
virtual host must have a hostname so in otherwords
---------------------------------------------------------
<VirtualHost 192.168.1.1:80>
    ServerAdmin webmaster@domain1.com
    DocumentRoot /var/www/html/domain1.com
    ServerName www.domain1.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>


<VirtualHost domain2.com:80>
    ServerAdmin webmaster@domain2.com
    DocumentRoot /var/www/html/domain2.com
    ServerName www.domain2.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

---------------------------------------------------------------------
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


---------------------------------------------------------------------
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