You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by banderson <br...@thomson.com> on 2007/10/26 17:54:35 UTC

Virtual Host with Different IP Address

I'm kind of new to this, so try to hear me out...  I am running tomcat on two
separate machines.  Each server has a different application running on it. 
Through my web browser, one server is accessed by domain mydomain.com, and
the other doesn't have a domain name, so I can only access it via the ip
address.  I would like to know if tomcat can create a virtual host (or some
other solution) on the server with mydomain.com so that the other server can
run as a subdomain.  For clarification, see the following:

Now: 
      server1 - mydomain.com
      server2 - 123.123.123.123
End result:
      server1 - mydomain.com
      server2 - sub.mydomain.com

Thank you for your help, I look forward to learning and participating in
these discussions.
-- 
View this message in context: http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13430102
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by Hassan Schroeder <ha...@gmail.com>.
On 10/26/07, banderson <br...@thomson.com> wrote:
>
> The site needs to be available to all of the internet.

Then your system needs a DNS entry.

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by banderson <br...@thomson.com>.
The site needs to be available to all of the internet.


Ken Bowen wrote:
> 
> The question is:   Do you want
> 
> sub.mydomain.com
> 
> to be visible to the entire internet, or are you only interested in
> accessing
> that system from your own personal browser. In the latter case, you don't
> have
> to get involved with dealing with godaddy.  As Matt suggested earlier, you
> only have to put the line
> 
> 123.123.123.123  sub.mydomain.com
> 
> into the hosts file on the machine running your browser.  On  *nix
> systems, 
> this is usually /etc/hosts, and on windows, it is typically
> 
> C:\Windows\System32\Dirvers\Etc\Hosts
> 
> Cheers,
> Ken Bowen
> 
> 
> banderson wrote:
>> Assuming my domain is hosted with godaddy, they should be able to take
>> care
>> of this?  I'm not familiar with DNS issues, and it would be nice to know
>> what I'm asking for %-|
>>
>> Thanks for the response! 
>>
>>
>> Hassan Schroeder-2 wrote:
>>   
>>> On 10/26/07, banderson <br...@thomson.com> wrote:
>>>     
>>>> So this can't be done with Tomcat?  I don't have access to the DNS
>>>> server,
>>>> are there any other workarounds?
>>>>       
>>> If it's only for your personal use, put the name in your hosts file. Or
>>> run your own name server.
>>>
>>> The point is that *your client browser* needs a way to resolve the
>>> name "sub.mydomain.com" to an IP address. This is not something
>>> that Tomcat is in any way involved in.
>>>
>>> -- 
>>> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13432270
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by Ken Bowen <kb...@als.com>.
The question is:   Do you want

sub.mydomain.com

to be visible to the entire internet, or are you only interested in accessing
that system from your own personal browser. In the latter case, you don't have
to get involved with dealing with godaddy.  As Matt suggested earlier, you
only have to put the line

123.123.123.123  sub.mydomain.com

into the hosts file on the machine running your browser.  On  *nix systems, 
this is usually /etc/hosts, and on windows, it is typically

C:\Windows\System32\Dirvers\Etc\Hosts

Cheers,
Ken Bowen


banderson wrote:
> Assuming my domain is hosted with godaddy, they should be able to take care
> of this?  I'm not familiar with DNS issues, and it would be nice to know
> what I'm asking for %-|
>
> Thanks for the response! 
>
>
> Hassan Schroeder-2 wrote:
>   
>> On 10/26/07, banderson <br...@thomson.com> wrote:
>>     
>>> So this can't be done with Tomcat?  I don't have access to the DNS
>>> server,
>>> are there any other workarounds?
>>>       
>> If it's only for your personal use, put the name in your hosts file. Or
>> run your own name server.
>>
>> The point is that *your client browser* needs a way to resolve the
>> name "sub.mydomain.com" to an IP address. This is not something
>> that Tomcat is in any way involved in.
>>
>> -- 
>> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>     
>
>   

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by banderson <br...@thomson.com>.
Assuming my domain is hosted with godaddy, they should be able to take care
of this?  I'm not familiar with DNS issues, and it would be nice to know
what I'm asking for %-|

Thanks for the response! 


Hassan Schroeder-2 wrote:
> 
> On 10/26/07, banderson <br...@thomson.com> wrote:
>>
>> So this can't be done with Tomcat?  I don't have access to the DNS
>> server,
>> are there any other workarounds?
> 
> If it's only for your personal use, put the name in your hosts file. Or
> run your own name server.
> 
> The point is that *your client browser* needs a way to resolve the
> name "sub.mydomain.com" to an IP address. This is not something
> that Tomcat is in any way involved in.
> 
> -- 
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13430956
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by Hassan Schroeder <ha...@gmail.com>.
On 10/26/07, banderson <br...@thomson.com> wrote:
>
> So this can't be done with Tomcat?  I don't have access to the DNS server,
> are there any other workarounds?

If it's only for your personal use, put the name in your hosts file. Or
run your own name server.

The point is that *your client browser* needs a way to resolve the
name "sub.mydomain.com" to an IP address. This is not something
that Tomcat is in any way involved in.

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by Hassan Schroeder <ha...@gmail.com>.
On 10/26/07, banderson <br...@thomson.com> wrote:
>
> Assuming my domain is hosted with godaddy, they should be able to take care
> of this?  I'm not familiar with DNS issues, and it would be nice to know
> what I'm asking for %-|

Who owns the netblock where this currently nameless IP resides?

It sounds to me like a little "independent study" on DNS would be a
good investment of your time :-)

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by banderson <br...@thomson.com>.
Assuming my domain is hosted with godaddy, they should be able to take care
of this?  I'm not familiar with DNS issues, and it would be nice to know
what I'm asking for %-|

Thanks for the response!



Matt Bockol wrote:
> 
> 
> You could run both apps under the same domain but still on different
> hosts, such that:
> 
> app1 is at mydomain.com
> app2 is at mydomain.com/app2
> 
> If you run tomcat behind apache httpd this is pretty simple to set up (via
> mod_proxy_ajp or mod_jk or ... )
> 
> For sub.mydomain.com you need to make a DNS change as Brian says. 
> Alternatively, you could place the following line in your /etc/hosts file:
> 
> 123.123.123.123  sub.mydomain.com
> 
> The only problem there is convincing everyone else in the world to do so
> as well :p
> 
> Matt
> 
> 
> ----- Original Message -----
> From: "banderson" <br...@thomson.com>
> To: users@tomcat.apache.org
> Sent: Friday, October 26, 2007 11:24:21 AM (GMT-0600) America/Chicago
> Subject: Re: Virtual Host with Different IP Address
> 
> 
> So this can't be done with Tomcat?  I don't have access to the DNS server,
> are there any other workarounds?
> 
> 
> Hassan Schroeder-2 wrote:
>> 
>> On 10/26/07, banderson <br...@thomson.com> wrote:
>> 
>>> Now:
>>>       server1 - mydomain.com
>>>       server2 - 123.123.123.123
>>> End result:
>>>       server1 - mydomain.com
>>>       server2 - sub.mydomain.com
>> 
>> This is not a Tomcat issue, this is a DNS issue.
>> 
>> Assign sub.mydomain.com to 123.123.123.123.
>> 
>> -- 
>> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
>> 
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13430607
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13430933
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by "Matthew A. Bockol" <mb...@carleton.edu>.
You could run both apps under the same domain but still on different hosts, such that:

app1 is at mydomain.com
app2 is at mydomain.com/app2

If you run tomcat behind apache httpd this is pretty simple to set up (via mod_proxy_ajp or mod_jk or ... )

For sub.mydomain.com you need to make a DNS change as Brian says.  Alternatively, you could place the following line in your /etc/hosts file:

123.123.123.123  sub.mydomain.com

The only problem there is convincing everyone else in the world to do so as well :p

Matt


----- Original Message -----
From: "banderson" <br...@thomson.com>
To: users@tomcat.apache.org
Sent: Friday, October 26, 2007 11:24:21 AM (GMT-0600) America/Chicago
Subject: Re: Virtual Host with Different IP Address


So this can't be done with Tomcat?  I don't have access to the DNS server,
are there any other workarounds?


Hassan Schroeder-2 wrote:
> 
> On 10/26/07, banderson <br...@thomson.com> wrote:
> 
>> Now:
>>       server1 - mydomain.com
>>       server2 - 123.123.123.123
>> End result:
>>       server1 - mydomain.com
>>       server2 - sub.mydomain.com
> 
> This is not a Tomcat issue, this is a DNS issue.
> 
> Assign sub.mydomain.com to 123.123.123.123.
> 
> -- 
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13430607
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by banderson <br...@thomson.com>.
So this can't be done with Tomcat?  I don't have access to the DNS server,
are there any other workarounds?


Hassan Schroeder-2 wrote:
> 
> On 10/26/07, banderson <br...@thomson.com> wrote:
> 
>> Now:
>>       server1 - mydomain.com
>>       server2 - 123.123.123.123
>> End result:
>>       server1 - mydomain.com
>>       server2 - sub.mydomain.com
> 
> This is not a Tomcat issue, this is a DNS issue.
> 
> Assign sub.mydomain.com to 123.123.123.123.
> 
> -- 
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Virtual-Host-with-Different-IP-Address-tf4698153.html#a13430607
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Virtual Host with Different IP Address

Posted by Hassan Schroeder <ha...@gmail.com>.
On 10/26/07, banderson <br...@thomson.com> wrote:

> Now:
>       server1 - mydomain.com
>       server2 - 123.123.123.123
> End result:
>       server1 - mydomain.com
>       server2 - sub.mydomain.com

This is not a Tomcat issue, this is a DNS issue.

Assign sub.mydomain.com to 123.123.123.123.

-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org