You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by david sims <da...@simscomputing.com> on 2000/04/09 16:10:47 UTC

Tomcat, multiple IP addresses, and virtual domains

hi,

[I posted this to tomcat-user but I think I should have posted it here to
tomcat-dev as well]

Is it possible to configure Tomcat to serve up one set of web pages if
HTTP requests come in to IP address X, and another set of web pages if HTTP
requests come into IP address Y?

What I'm getting at is having a Linux box with multiple IP addresses. I'd like
to configure Tomcat to serve up web pages and servlets for multiple web sites
on the same machine.

I was looking in org.apache.tomcat.service.http.HttpConnectionHandler.java for
some answers, but it's still unclear to me. Hence my post.

If it's currently not possible, I'd be interested in submitting a patch that
does this, as long as someone can guide me a bit on the whole Tomcat
architecture.

And for that matter, I'd be interested in submitting a patch for virtual domain
support. I know the FAQ says "use Apache for virtual domains", but I'm a bit of
a Java bigot. I'd prefer to run Tomcat for everything and not use Apache at all
as a web server.

thanks,
david

-- 
David Sims               david@simscomputing.com
Sims Computing, Inc.       www.simscomputing.com

Re: Tomcat, Apavhe, multiple name based virtual hosts

Posted by Jun Inamori <j-...@osa.att.ne.jp>.
Hi Rabia,

It can be done to define 'ApJServMount' within the 'VirtualHost'
directive of 'httpd.conf'.
For details about the configuration of JServ and Tomcat3.1Beta,
	http://www.oop-reserch.com/tomcat
and
	http://www.oop-reserch.com/tomcat/faq.html#1

I hope this will help you.
Happy Java programming!

Jun Inamori
E-mail: j-office@osa.att.ne.jp
URL:    http://www.oop-reserch.com

rmalik wrote:
> 
> hi,
> I'm having a Linux box with multiple name based virtual hosts defined in Apache
> 3.1.9 configuration. I'd like  to configure Tomcat + Apache to serve up web
> pages and servlets for multiple web sites  on the same machine.
> I know that this approach is possible and I've gone through all the
> documentation regarding this. When I tried to configure this on my machine, it
> is not giving me the results I want.
> For example consider 2 virtual hosts vhost1.domain.com and vhost2.domain.com. I
> created the respective configuration files. Now I want to access the first
> vhost1 by http://vhost1.domain.com/ but I have to type
> http://vhost1.domain.com/vhost1 for that. Same is the case for vhost2, I type
> http://vhost2.domain.com/ vhost2 in the browser window to access that website's
> pages.
> I've tried all the options as explained in Apache and tomcat virtual host
> configuration documentation.
> Can anybody help me in this regard. I'll be much grateful cause this is a
> critical problem  my recently started career is facing.
> 
> Thanks in advance.
> Rabia
> 
> reply me at rabia.malik@ardec.com

Tomcat, Apavhe, multiple name based virtual hosts

Posted by rmalik <ra...@ardec.com>.
hi,
I'm having a Linux box with multiple name based virtual hosts defined in Apache
3.1.9 configuration. I'd like  to configure Tomcat + Apache to serve up web
pages and servlets for multiple web sites  on the same machine.
I know that this approach is possible and I've gone through all the
documentation regarding this. When I tried to configure this on my machine, it
is not giving me the results I want.
For example consider 2 virtual hosts vhost1.domain.com and vhost2.domain.com. I
created the respective configuration files. Now I want to access the first
vhost1 by http://vhost1.domain.com/ but I have to type
http://vhost1.domain.com/vhost1 for that. Same is the case for vhost2, I type
http://vhost2.domain.com/ vhost2 in the browser window to access that website's
pages.
I've tried all the options as explained in Apache and tomcat virtual host
configuration documentation.
Can anybody help me in this regard. I'll be much grateful cause this is a
critical problem  my recently started career is facing.

Thanks in advance.
Rabia

reply me at rabia.malik@ardec.com




Re: Tomcat, multiple IP addresses, and virtual domains

Posted by Brill Pappin <br...@jmonkey.com>.
David,
See named hosts (also virtual hosts, two different things)  in the Apache
documentation.

-Brill Pappin

----- Original Message -----
From: "david sims" <da...@simscomputing.com>
To: <to...@jakarta.apache.org>
Sent: Sunday, April 09, 2000 10:10 AM
Subject: Tomcat, multiple IP addresses, and virtual domains


> hi,
>
> [I posted this to tomcat-user but I think I should have posted it here to
> tomcat-dev as well]
>
> Is it possible to configure Tomcat to serve up one set of web pages if
> HTTP requests come in to IP address X, and another set of web pages if
HTTP
> requests come into IP address Y?
>
> What I'm getting at is having a Linux box with multiple IP addresses. I'd
like
> to configure Tomcat to serve up web pages and servlets for multiple web
sites
> on the same machine.
>
> I was looking in org.apache.tomcat.service.http.HttpConnectionHandler.java
for
> some answers, but it's still unclear to me. Hence my post.
>
> If it's currently not possible, I'd be interested in submitting a patch
that
> does this, as long as someone can guide me a bit on the whole Tomcat
> architecture.
>
> And for that matter, I'd be interested in submitting a patch for virtual
domain
> support. I know the FAQ says "use Apache for virtual domains", but I'm a
bit of
> a Java bigot. I'd prefer to run Tomcat for everything and not use Apache
at all
> as a web server.
>
> thanks,
> david
>
> --
> David Sims               david@simscomputing.com
> Sims Computing, Inc.       www.simscomputing.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


Re: Tomcat, multiple IP addresses, and virtual domains

Posted by Clint Combs <cl...@ccombs.net>.
David,

Attached is a copy of an e-mail you posted to tomcat-dev a while ago.  I'm
interested in doing virtual hosting via multiple IPs also.  Did you ever get this
working?  If so, would you please reply and let me know how?  When I attempt to do
this I get a NullPointerException in the SimpleMapper class.

Thanks,
Clint

david sims wrote:

> hi,
>
> [I posted this to tomcat-user but I think I should have posted it here to
> tomcat-dev as well]
>
> Is it possible to configure Tomcat to serve up one set of web pages if
> HTTP requests come in to IP address X, and another set of web pages if HTTP
> requests come into IP address Y?
>
> What I'm getting at is having a Linux box with multiple IP addresses. I'd like
> to configure Tomcat to serve up web pages and servlets for multiple web sites
> on the same machine.
>
> I was looking in org.apache.tomcat.service.http.HttpConnectionHandler.java for
> some answers, but it's still unclear to me. Hence my post.
>
> If it's currently not possible, I'd be interested in submitting a patch that
> does this, as long as someone can guide me a bit on the whole Tomcat
> architecture.
>
> And for that matter, I'd be interested in submitting a patch for virtual domain
> support. I know the FAQ says "use Apache for virtual domains", but I'm a bit of
> a Java bigot. I'd prefer to run Tomcat for everything and not use Apache at all
> as a web server.
>
> thanks,
> david
>
> --
> David Sims               david@simscomputing.com
> Sims Computing, Inc.       www.simscomputing.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Tomcat, multiple IP addresses, and virtual domains

Posted by Gal Shachor <sh...@il.ibm.com>.

David,

> 
> Is it possible to configure Tomcat to serve up one set of web pages if
> HTTP requests come in to IP address X, and another set of web pages if HTTP
> requests come into IP address Y?
> 
Not yet.

> 
> If it's currently not possible, I'd be interested in submitting a patch that
> does this, as long as someone can guide me a bit on the whole Tomcat
> architecture.
> 
> And for that matter, I'd be interested in submitting a patch for virtual domain
> support. I know the FAQ says "use Apache for virtual domains", but I'm a bit of
> a Java bigot. I'd prefer to run Tomcat for everything and not use Apache at all
> as a web server.
> 

Costin explained that to Richard Vowles in an email thread that we
should not
repeat. I would recommend you to lookup the word "SimpleMapper" in the
email list 
archive...
Posts (such as
http://www.metronet.com/~wjm/tomcat/FromFeb11/msg01194.html) with 
subject such as "Re: Multi-homing/Virtual named hosts" should contain
the
information that you need.

	Gal Shachor