httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "29djeo" <29d...@michaelstarkie.com>
Subject Re: [users@httpd] name-based virtual hosting with DNS web forwarding
Date Fri, 09 Jan 2004 00:21:48 GMT
The solution to this problem was:

1) you can't have both domains point to the same ip and port so I changed the web forwarding
on my dns manager so that

www.mydomain1.com --> 192.xxx.xxx.xxx:8081
www.mydomain2.com --> 192.xxx.xxx.xxx:8082

2) set up httpd.conf such that 

Listen 8081
Listen 8082

NameVIrtualHost *:8081
NameVirtualHost *.8082

<VirtualHost *:8081>
ServerName www.mydomain1.com
yada yada yada
</virtualHost>

<VirtualHost *:8082>
ServerName www.mydomain2.com
yada yada yada
</virtualHost>

mike

   -------Original Message-------
   > From: 29djeo <29djeo@michaelstarkie.com>
   > Subject: [users@httpd] name-based virtual hosting with DNS web forwarding
   > Sent: 08 Jan 2004 19:00:41
   >
   >  I am trying to serve two domains, mydomain1 and mydomain2, on a single machine by
running an instance of apache and two instances of tomcat with mod_jk in between.
   >  
   >  I've got things set up so that when I point a browser at http://www.mydomain1.com
or http://www.mydomain2.com I always get the DocumentRoot defined for the first VirtualHost
entry in httpd.conf (mydomain1).
   >  
   >  My DNS manager uses web-forwarding so that requests for either domain get sent to
the same ipaddress:port  so that requests for http://www.mydomain1.com and http://www.mydomain2.com
both get mapped to http://192.168.2.101:8081.
   >  
   >  I suspect that http requests to both domains are identical and that's why I'm getting
the "default" virtual host's DocumentRoot (mydomain1).
   >  
   >  How do you get around this problem?
   >  
   >  -or-
   >  
   >  How do I get the apache logger to dump the http requests so I can look at the http
header and request parameters to confirm?
   >  
   >  thx,
   >  Mike
   -------Original Message-------



Mime
View raw message