httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason D" <ja...@codepanzyz.com>
Subject Re: [users@httpd] name-based virtual hosting with DNS web forwarding
Date Fri, 09 Jan 2004 04:17:42 GMT
I don't know anything about "tomcat with mod_jk" but I have no problem with
serving 2 web sites on the same port and same ip on the same box. My DNS
manager is DYNDNS and they map the domain names to my ip address. the
relivant part of my apahce vhost config looks like this.

<VirtualHost *>
     ServerAdmin admin@siteone.com
     DocumentRoot /wwwroot/htdocs/siteone/
     ServerName  siteone.com
     ServerAlias www.siteone.com
    </VirtualHost>

<VirtualHost *>
     ServerAdmin admin@sitetwo.com
     DocumentRoot /wwwroot/htdocs/sitetwo/
     ServerName  sitetwo.com
     ServerAlias www.sitetwo.com
 </VirtualHost>




----- Original Message ----- 
From: 29djeo
To: users@httpd.apache.org
Sent: Thursday, January 08, 2004 4:21 PM
Subject: Re: [users@httpd] name-based virtual hosting with DNS web
forwarding


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


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