You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tony Anecito <ad...@yahoo.com> on 2007/09/28 17:33:34 UTC

[users@httpd] Tomcat and Apache on the same port?

Hi All,

Is it possible to run Tomcat and Apache on the same
port? What I want to do is have my website running on
Apache web server or port 80 and also have Tomcat
running on port 80. That way my web service requests
do not need to go through Apache web server where they
are redirected to Tomcat.
I am trying to avoid web service requests going to a
different port on the client side and getting stopped
by a proxy but perhaps that does not stop http
requests going another site on port say 81?

Thanks,
-Tony


       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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


Re: [users@httpd] Tomcat and Apache on the same port?

Posted by Michael Conlen <m...@obmail.net>.
There's two things you can do, but first...

You can not run two programs on the same IP address on the same port  
for the same protocol. If this were possible there's no way to know  
which program handles a request.

You could use two different host names with two different IP  
addresses on the same server. All requests that should go to tomcat  
goes to one host name and others go to another host name and both can  
use port 80 on their respective IP addresses.

Another option is to run the servers on different ports then use a  
layer 7 switch to redirect them by URL.

--
Michael Conlen


On Sep 28, 2007, at 11:33 AM, Tony Anecito wrote:

> Hi All,
>
> Is it possible to run Tomcat and Apache on the same
> port? What I want to do is have my website running on
> Apache web server or port 80 and also have Tomcat
> running on port 80. That way my web service requests
> do not need to go through Apache web server where they
> are redirected to Tomcat.
> I am trying to avoid web service requests going to a
> different port on the client side and getting stopped
> by a proxy but perhaps that does not stop http
> requests going another site on port say 81?
>
> Thanks,
> -Tony
>
>
>
> ______________________________________________________________________ 
> ______________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
>
> ---------------------------------------------------------------------
> 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


RE: Tomcat and Apache on the same port?

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Tony Anecito [mailto:adanecito@yahoo.com] 
> The Tomcat server is running web services which are
> dynamic.

OK.  That's an answer to a slightly different question to the one I
asked, so let me unpack it a bit :-).

- You presently have a Tomcat server front-ended by Apache httpd.

- You serve dynamic content from your Tomcat server.

- You serve some content directly from httpd - this content is not
JkMounted, so it never goes to Tomcat.

For the content that's served directly from httpd, what kind of content
is it?  If it's static HTML pages, for example, you could serve it
directly via Tomcat, put Tomcat directly on port 80, uninstall httpd (if
you wish) and hence take httpd and JK out of the path.

Clearly if the content served from httpd is something Tomcat can't
serve, this doesn't work!

		- Peter

---------------------------------------------------------------------
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: Tomcat and Apache on the same port?

Posted by Tony Anecito <ad...@yahoo.com>.
Thanks Peter,

The Tomcat server is running web services which are
dynamic.
And I agree about what you said about port 80.

Hope this helps,
-Tony


--- Peter Crowther <Pe...@melandra.com>
wrote:

> > From: Tony Anecito [mailto:adanecito@yahoo.com] 
> > Is it possible to run Tomcat and Apache on the
> same
> > port?
> 
> You can't run two processes bound to the same
> endpoint (combination of
> IP address and port).  As httpd (what you call
> "Apache") and Tomcat are
> separate process, you can't do this.  As Filip has
> already said, you'd
> need two IP addresses if you wanted them both on
> :80.  Ideally you'd
> also need two host names for them -
> www.mydomain.example and
> services.mydomain.example, for example - although
> you *could* use the
> bare IP address for the services one if you had to. 
> It's generally far
> easier to allocate another hostname.
> 
> > What I want to do is have my website running on
> > Apache web server on port 80
> 
> Is this just static content, or is there anything
> dynamic in it that
> Tomcat can't serve?  If it's static, one option is
> for Tomcat to serve
> that content.
> 
> > I am trying to avoid web service requests going to
> a
> > different port on the client side and getting
> stopped
> > by a proxy but perhaps that does not stop http
> > requests going another site on port say 81?
> 
> If you're calling these web services from the
> client, the only ports you
> can rely on are 80 and (usually) 443 for SSL.  Many
> firewalls also leave
> 8080 open, but I've come across some more vindictive
> firewalls that drop
> requests to 8080.  You'll also find a few *really*
> vicious firewalls
> that disallow SOAP across the Internet, so it's all
> a matter of degree.
> 
> 		- Peter
> 
>
---------------------------------------------------------------------
> 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
> 
> 



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

---------------------------------------------------------------------
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: Tomcat and Apache on the same port?

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Tony Anecito [mailto:adanecito@yahoo.com] 
> Is it possible to run Tomcat and Apache on the same
> port?

You can't run two processes bound to the same endpoint (combination of
IP address and port).  As httpd (what you call "Apache") and Tomcat are
separate process, you can't do this.  As Filip has already said, you'd
need two IP addresses if you wanted them both on :80.  Ideally you'd
also need two host names for them - www.mydomain.example and
services.mydomain.example, for example - although you *could* use the
bare IP address for the services one if you had to.  It's generally far
easier to allocate another hostname.

> What I want to do is have my website running on
> Apache web server on port 80

Is this just static content, or is there anything dynamic in it that
Tomcat can't serve?  If it's static, one option is for Tomcat to serve
that content.

> I am trying to avoid web service requests going to a
> different port on the client side and getting stopped
> by a proxy but perhaps that does not stop http
> requests going another site on port say 81?

If you're calling these web services from the client, the only ports you
can rely on are 80 and (usually) 443 for SSL.  Many firewalls also leave
8080 open, but I've come across some more vindictive firewalls that drop
requests to 8080.  You'll also find a few *really* vicious firewalls
that disallow SOAP across the Internet, so it's all a matter of degree.

		- Peter

---------------------------------------------------------------------
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: Tomcat and Apache on the same port?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tony,

Tony Anecito wrote:
> Would the two IP addresses (real or Virtual) require
> two domain names?

No, but you probably would want to have more than one domain name
instead of having to publish your IP address.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/Sho9CaO5/Lv0PARAqdmAKCb5njL3lKBWJ7ypYxznND7ESv+FwCeJfAc
nxdINihX+mfJxbtgcC8BnII=
=78Cm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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: Tomcat and Apache on the same port?

Posted by Tony Anecito <ad...@yahoo.com>.
Hi Filip,

Would the two IP addresses (real or Virtual) require
two domain names?

Thanks,
-Tony

--- Filip Hanik - Dev Lists <de...@hanik.com>
wrote:

> yes, but you would need two IP addresses, virtual or
> through two network 
> cards
> and bind tomcat to one address, and bind apache to
> the other
> 
> Filip
> 
> Tony Anecito wrote:
> > Hi All,
> >
> > Is it possible to run Tomcat and Apache on the
> same
> > port? What I want to do is have my website running
> on
> > Apache web server or port 80 and also have Tomcat
> > running on port 80. That way my web service
> requests
> > do not need to go through Apache web server where
> they
> > are redirected to Tomcat.
> > I am trying to avoid web service requests going to
> a
> > different port on the client side and getting
> stopped
> > by a proxy but perhaps that does not stop http
> > requests going another site on port say 81?
> >
> > Thanks,
> > -Tony
> >
> >
> >        
> >
>
____________________________________________________________________________________
> > Need a vacation? Get great deals
> > to amazing places on Yahoo! Travel.
> > http://travel.yahoo.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
> 
> 



      ____________________________________________________________________________________
Don't let your dream ride pass you by. Make it a reality with Yahoo! Autos.
http://autos.yahoo.com/index.html
 



---------------------------------------------------------------------
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: Tomcat and Apache on the same port?

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
yes, but you would need two IP addresses, virtual or through two network 
cards
and bind tomcat to one address, and bind apache to the other

Filip

Tony Anecito wrote:
> Hi All,
>
> Is it possible to run Tomcat and Apache on the same
> port? What I want to do is have my website running on
> Apache web server or port 80 and also have Tomcat
> running on port 80. That way my web service requests
> do not need to go through Apache web server where they
> are redirected to Tomcat.
> I am trying to avoid web service requests going to a
> different port on the client side and getting stopped
> by a proxy but perhaps that does not stop http
> requests going another site on port say 81?
>
> Thanks,
> -Tony
>
>
>        
> ____________________________________________________________________________________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.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: [users@httpd] Tomcat and Apache on the same port?

Posted by Tony Anecito <ad...@yahoo.com>.
I am okay with proxing through Apache as long as I can
measure the time through Tomcat down to millisecond or
better yet microsecond resolution.

For the last several years I have been working on new
type of Educational system using the latest
technologies and since I am working on creating a new
startup I want to be able keep costs low for licenses
for the customers and keep the hardware requirments
low.

Using the 5.x version of Tomcat in JBoss I got down to
subnanosecond in my measurments at the servlet level
yet getting the rest of the way out of Tomcat/Apache
took over 1o milliseconds. Doing some hardware
upgrades that I could afford and upgrading the jvm
some adjustments of Tomcat and the jvm I got down to
the 4millisecond range.

Does that help answer the question?

Regards,
Tony Anecito
Founder, MyUniPortal

--- Dan_Mitton@Notes.YMP.GOV wrote:

> Tony,
> 
> Aaah.  That is what I feared.  You would need to get
> a second static IP 
> address from your ISP to make any of this work.
> 
> If you are stuck with one static IP address from
> your ISP, I think your 
> only solution is the mod_jk that you are already
> doing.  Why is proxying 
> the tomcat requests through apache a problem?
> 
> 
> 
> Please respond to users@httpd.apache.org
> 
> To:     users@httpd.apache.org
> cc:      (bcc: Dan Mitton/YD/RWDOE)
> Subject:        Re: [users@httpd] Tomcat and Apache
> on the same port?
> LSN: Not Relevant
> User Filed as: Not a Record
> 
> Hi Dan,
> 
> This is a home/isp lan. I am using 2.2.4 of Apache
> and
> JBoss 4.2.1GA on windows 2000 sp4 with jre 1.6.0_02.
> 
> Regards,
> -Tony Founder,
> MyUniPortal
> 
> --- Dan_Mitton@Notes.YMP.GOV wrote:
> 
> > Tony,
> > 
> > Yes.  One physical server and/or network card can
> > support multiple IP 
> > addresses.  What OS is this?  When you say LAN, is
> > this a corporate LAN or 
> > a home/isp LAN?  Which versions of apache and
> > tomcat?  proxy_ajp and 
> > mod_jk are the same thing, only proxy_ajp is for
> > apache 2.2+ and mod_jk 
> > pre-2.2.
> > 
> > Ok, before we can do anything, you'll need a
> second
> > static IP address for 
> > your server.  Then, it needs to get configured on
> > your server.  I'm more 
> > of a Unix guy, but maybe someone else out here
> could
> > help out if your 
> > running windows.
> > 
> > After that...
> > 
> > In apache, you likely have a:
> > 
> > Listen 80
> > 
> > somewhere.  You can change that to:
> > 
> > Listen <ip-address1>:80
> > 
> > without the '<', '>', so that apache will only
> list
> > on that 
> > ip-address/port combination.
> > 
> > Likewise, in tomcat, you likely have something
> like:
> > 
> > <Connector port="80" ...
> > 
> > you can add an address parameter to specify an ip
> > address, like:
> > 
> > <Connector port="80" address="<ip-address2>" ...
> > 
> > Have you ever used the 'netstat' command?  On
> > windows, something like:
> > 
> > netstat -nap tcp
> > 
> > will output something like:
> > 
> > Active Connections
> > 
> >   Proto  Local Address          Foreign Address 
> >   State
> >         .
> >         .
> >         .
> >   TCP    0.0.0.0:80             0.0.0.0:0 
> >   LISTENING
> >         .
> >         .
> >         .
> > 
> > or on Unix (at least Sun Solaris 10) something
> like:
> > 
> > netstat -naf inet
> > 
> > On Unix, you might see '*', instead of 0.0.0.0,
> but
> > they both mean the 
> > same thing, all address on the server.  If you run
> > netstat before make the 
> > above apache/tomcat changes, you would see:
> > 
> >   TCP    0.0.0.0:80             0.0.0.0:0 
> >   LISTENING
> > 
> > after the changes, it should look like:
> > 
> >   TCP    <ip-address1>:80             0.0.0.0:0 
> >         LISTENING
> >   TCP    <ip-address2>:80             0.0.0.0:0 
> >         LISTENING
> > 
> > 
> > 
> > 
> > Please respond to users@httpd.apache.org
> > 
> > To:     users@httpd.apache.org
> > cc:      (bcc: Dan Mitton/YD/RWDOE)
> > Subject:        Re: [users@httpd] Tomcat and
> Apache
> > on the same port?
> > LSN: Not Relevant
> > User Filed as: Not a Record
> > 
> > Hi Dan,
> > 
> > Thanks for the response. So I can have different
> > IP's
> > for the same physical server how would the client
> > and
> > the router handle that? I have a static address
> for
> > my
> > server on the lan and I redirect my request for
> port
> > 80 to that IP. What decides the IP to send a
> request
> > to the web server versus the Tomcat servlet
> > container?
> > 
> > Sounds good but I am trying to sort through the
> > details for that configuration.
> > 
> > Also, I am already sending requests to Tomcat via
> > mod_jk in Apache so not sure what the advantages
> are
> > of proxy_ajp.
> > 
> > Many Thanks,
> > -Tony
> > 
> > --- Dan_Mitton@Notes.YMP.GOV wrote:
> > 
> > > Tony,
> > > 
> > > The only way to have two services use/listen on
> > the
> > > same port is to use 
> > > two different IP addresses, one for each.  Then
> > each
> > > can listen on port 
> > > 80.
> > > 
> > > A possible, very high effort, alternative would
> be
> > > to write a program that 
> > > would sit in front of both apache and tomcat,
> that
> > > could examine the 
> > > incoming packets and determine to route it to
> > apache
> > > or tomcat based on 
> > > the packet content.  I'm talking a very
> > complicated
> > > program here.
> > > 
> > > Apache proxying requests through to tomcat is
> not
> > > that expensive overhead 
> > > wise.  That would really be your best solution. 
> > > Look at the proxy_ajp 
> > > module in apache 2.2
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > Please respond to users@httpd.apache.org
> > > 
> > > To:     Tomcat Users Group
> > <us...@tomcat.apache.org>
> > > cc:     Apache Mailing List
> > <us...@httpd.apache.org>
> > > (bcc: Dan 
> > > Mitton/YD/RWDOE)
> > > Subject:        [users@httpd] Tomcat and Apache
> on
> > > the same port?
> > > LSN: Not Relevant
> > > User Filed as: Not a Record
> > > 
> > > Hi All,
> > > 
> > > Is it possible to run Tomcat and Apache on the
> > same
> > > port? What I want to do is have my website
> running
> > > on
> > > Apache web server or port 80 and also have
> Tomcat
> > > running on port 80. That way my web service
> > requests
> > > do not need to go through Apache web server
> where
> > > they
> > > are redirected to Tomcat.
> > > I am trying to avoid web service requests going
> to
> > a
> > > different port on the client side and getting
> > > stopped
> > > by a proxy but perhaps that does not stop http
> > > requests going another site on port say 81?
> > > 
> > > Thanks,
> > > -Tony
> > > 
> > > 
> > > 
> > >
> >
>
____________________________________________________________________________________
> > > Need a vacation? Get great deals
> > > to amazing places on Yahoo! Travel.
> > > http://travel.yahoo.com/
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > 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
> > > 
> > > 
> > 
> > 
> > 
> > 
> >
>
____________________________________________________________________________________
> > Yahoo! oneSearch: Finally, mobile search 
> > that gives answers, not web links. 
> >
>
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
> > 
> >
>
---------------------------------------------------------------------
> > 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
> > 
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> Moody friends. Drama queens. Your life? Nope! -
> their life, your story. 
> Play Sims Stories at Yahoo! Games.
> http://sims.yahoo.com/ 
> 
>
---------------------------------------------------------------------
> 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
> 
> 



      ____________________________________________________________________________________
Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

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


Re: [users@httpd] Tomcat and Apache on the same port?

Posted by Da...@Notes.YMP.GOV.
Tony,

Aaah.  That is what I feared.  You would need to get a second static IP 
address from your ISP to make any of this work.

If you are stuck with one static IP address from your ISP, I think your 
only solution is the mod_jk that you are already doing.  Why is proxying 
the tomcat requests through apache a problem?



Please respond to users@httpd.apache.org

To:     users@httpd.apache.org
cc:      (bcc: Dan Mitton/YD/RWDOE)
Subject:        Re: [users@httpd] Tomcat and Apache on the same port?
LSN: Not Relevant
User Filed as: Not a Record

Hi Dan,

This is a home/isp lan. I am using 2.2.4 of Apache and
JBoss 4.2.1GA on windows 2000 sp4 with jre 1.6.0_02.

Regards,
-Tony Founder,
MyUniPortal

--- Dan_Mitton@Notes.YMP.GOV wrote:

> Tony,
> 
> Yes.  One physical server and/or network card can
> support multiple IP 
> addresses.  What OS is this?  When you say LAN, is
> this a corporate LAN or 
> a home/isp LAN?  Which versions of apache and
> tomcat?  proxy_ajp and 
> mod_jk are the same thing, only proxy_ajp is for
> apache 2.2+ and mod_jk 
> pre-2.2.
> 
> Ok, before we can do anything, you'll need a second
> static IP address for 
> your server.  Then, it needs to get configured on
> your server.  I'm more 
> of a Unix guy, but maybe someone else out here could
> help out if your 
> running windows.
> 
> After that...
> 
> In apache, you likely have a:
> 
> Listen 80
> 
> somewhere.  You can change that to:
> 
> Listen <ip-address1>:80
> 
> without the '<', '>', so that apache will only list
> on that 
> ip-address/port combination.
> 
> Likewise, in tomcat, you likely have something like:
> 
> <Connector port="80" ...
> 
> you can add an address parameter to specify an ip
> address, like:
> 
> <Connector port="80" address="<ip-address2>" ...
> 
> Have you ever used the 'netstat' command?  On
> windows, something like:
> 
> netstat -nap tcp
> 
> will output something like:
> 
> Active Connections
> 
>   Proto  Local Address          Foreign Address 
>   State
>         .
>         .
>         .
>   TCP    0.0.0.0:80             0.0.0.0:0 
>   LISTENING
>         .
>         .
>         .
> 
> or on Unix (at least Sun Solaris 10) something like:
> 
> netstat -naf inet
> 
> On Unix, you might see '*', instead of 0.0.0.0, but
> they both mean the 
> same thing, all address on the server.  If you run
> netstat before make the 
> above apache/tomcat changes, you would see:
> 
>   TCP    0.0.0.0:80             0.0.0.0:0 
>   LISTENING
> 
> after the changes, it should look like:
> 
>   TCP    <ip-address1>:80             0.0.0.0:0 
>         LISTENING
>   TCP    <ip-address2>:80             0.0.0.0:0 
>         LISTENING
> 
> 
> 
> 
> Please respond to users@httpd.apache.org
> 
> To:     users@httpd.apache.org
> cc:      (bcc: Dan Mitton/YD/RWDOE)
> Subject:        Re: [users@httpd] Tomcat and Apache
> on the same port?
> LSN: Not Relevant
> User Filed as: Not a Record
> 
> Hi Dan,
> 
> Thanks for the response. So I can have different
> IP's
> for the same physical server how would the client
> and
> the router handle that? I have a static address for
> my
> server on the lan and I redirect my request for port
> 80 to that IP. What decides the IP to send a request
> to the web server versus the Tomcat servlet
> container?
> 
> Sounds good but I am trying to sort through the
> details for that configuration.
> 
> Also, I am already sending requests to Tomcat via
> mod_jk in Apache so not sure what the advantages are
> of proxy_ajp.
> 
> Many Thanks,
> -Tony
> 
> --- Dan_Mitton@Notes.YMP.GOV wrote:
> 
> > Tony,
> > 
> > The only way to have two services use/listen on
> the
> > same port is to use 
> > two different IP addresses, one for each.  Then
> each
> > can listen on port 
> > 80.
> > 
> > A possible, very high effort, alternative would be
> > to write a program that 
> > would sit in front of both apache and tomcat, that
> > could examine the 
> > incoming packets and determine to route it to
> apache
> > or tomcat based on 
> > the packet content.  I'm talking a very
> complicated
> > program here.
> > 
> > Apache proxying requests through to tomcat is not
> > that expensive overhead 
> > wise.  That would really be your best solution. 
> > Look at the proxy_ajp 
> > module in apache 2.2
> > 
> > Dan
> > 
> > 
> > 
> > Please respond to users@httpd.apache.org
> > 
> > To:     Tomcat Users Group
> <us...@tomcat.apache.org>
> > cc:     Apache Mailing List
> <us...@httpd.apache.org>
> > (bcc: Dan 
> > Mitton/YD/RWDOE)
> > Subject:        [users@httpd] Tomcat and Apache on
> > the same port?
> > LSN: Not Relevant
> > User Filed as: Not a Record
> > 
> > Hi All,
> > 
> > Is it possible to run Tomcat and Apache on the
> same
> > port? What I want to do is have my website running
> > on
> > Apache web server or port 80 and also have Tomcat
> > running on port 80. That way my web service
> requests
> > do not need to go through Apache web server where
> > they
> > are redirected to Tomcat.
> > I am trying to avoid web service requests going to
> a
> > different port on the client side and getting
> > stopped
> > by a proxy but perhaps that does not stop http
> > requests going another site on port say 81?
> > 
> > Thanks,
> > -Tony
> > 
> > 
> > 
> >
>
____________________________________________________________________________________
> > Need a vacation? Get great deals
> > to amazing places on Yahoo! Travel.
> > http://travel.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > 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
> > 
> > 
> 
> 
> 
> 
>
____________________________________________________________________________________
> Yahoo! oneSearch: Finally, mobile search 
> that gives answers, not web links. 
>
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
> 
>
---------------------------------------------------------------------
> 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
> 
> 



 
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. 
Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/ 

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


Re: [users@httpd] Tomcat and Apache on the same port?

Posted by Tony Anecito <ad...@yahoo.com>.
Hi Dan,

This is a home/isp lan. I am using 2.2.4 of Apache and
JBoss 4.2.1GA on windows 2000 sp4 with jre 1.6.0_02.

Regards,
-Tony Founder,
MyUniPortal

--- Dan_Mitton@Notes.YMP.GOV wrote:

> Tony,
> 
> Yes.  One physical server and/or network card can
> support multiple IP 
> addresses.  What OS is this?  When you say LAN, is
> this a corporate LAN or 
> a home/isp LAN?  Which versions of apache and
> tomcat?  proxy_ajp and 
> mod_jk are the same thing, only proxy_ajp is for
> apache 2.2+ and mod_jk 
> pre-2.2.
> 
> Ok, before we can do anything, you'll need a second
> static IP address for 
> your server.  Then, it needs to get configured on
> your server.  I'm more 
> of a Unix guy, but maybe someone else out here could
> help out if your 
> running windows.
> 
> After that...
> 
> In apache, you likely have a:
> 
> Listen 80
> 
> somewhere.  You can change that to:
> 
> Listen <ip-address1>:80
> 
> without the '<', '>', so that apache will only list
> on that 
> ip-address/port combination.
> 
> Likewise, in tomcat, you likely have something like:
> 
> <Connector port="80" ...
> 
> you can add an address parameter to specify an ip
> address, like:
> 
> <Connector port="80" address="<ip-address2>" ...
> 
> Have you ever used the 'netstat' command?  On
> windows, something like:
> 
> netstat -nap tcp
> 
> will output something like:
> 
> Active Connections
> 
>   Proto  Local Address          Foreign Address     
>   State
>         .
>         .
>         .
>   TCP    0.0.0.0:80             0.0.0.0:0           
>   LISTENING
>         .
>         .
>         .
> 
> or on Unix (at least Sun Solaris 10) something like:
> 
> netstat -naf inet
> 
> On Unix, you might see '*', instead of 0.0.0.0, but
> they both mean the 
> same thing, all address on the server.  If you run
> netstat before make the 
> above apache/tomcat changes, you would see:
> 
>   TCP    0.0.0.0:80             0.0.0.0:0           
>   LISTENING
> 
> after the changes, it should look like:
> 
>   TCP    <ip-address1>:80             0.0.0.0:0     
>         LISTENING
>   TCP    <ip-address2>:80             0.0.0.0:0     
>         LISTENING
> 
> 
> 
> 
> Please respond to users@httpd.apache.org
> 
> To:     users@httpd.apache.org
> cc:      (bcc: Dan Mitton/YD/RWDOE)
> Subject:        Re: [users@httpd] Tomcat and Apache
> on the same port?
> LSN: Not Relevant
> User Filed as: Not a Record
> 
> Hi Dan,
> 
> Thanks for the response. So I can have different
> IP's
> for the same physical server how would the client
> and
> the router handle that? I have a static address for
> my
> server on the lan and I redirect my request for port
> 80 to that IP. What decides the IP to send a request
> to the web server versus the Tomcat servlet
> container?
> 
> Sounds good but I am trying to sort through the
> details for that configuration.
> 
> Also, I am already sending requests to Tomcat via
> mod_jk in Apache so not sure what the advantages are
> of proxy_ajp.
> 
> Many Thanks,
> -Tony
> 
> --- Dan_Mitton@Notes.YMP.GOV wrote:
> 
> > Tony,
> > 
> > The only way to have two services use/listen on
> the
> > same port is to use 
> > two different IP addresses, one for each.  Then
> each
> > can listen on port 
> > 80.
> > 
> > A possible, very high effort, alternative would be
> > to write a program that 
> > would sit in front of both apache and tomcat, that
> > could examine the 
> > incoming packets and determine to route it to
> apache
> > or tomcat based on 
> > the packet content.  I'm talking a very
> complicated
> > program here.
> > 
> > Apache proxying requests through to tomcat is not
> > that expensive overhead 
> > wise.  That would really be your best solution. 
> > Look at the proxy_ajp 
> > module in apache 2.2
> > 
> > Dan
> > 
> > 
> > 
> > Please respond to users@httpd.apache.org
> > 
> > To:     Tomcat Users Group
> <us...@tomcat.apache.org>
> > cc:     Apache Mailing List
> <us...@httpd.apache.org>
> > (bcc: Dan 
> > Mitton/YD/RWDOE)
> > Subject:        [users@httpd] Tomcat and Apache on
> > the same port?
> > LSN: Not Relevant
> > User Filed as: Not a Record
> > 
> > Hi All,
> > 
> > Is it possible to run Tomcat and Apache on the
> same
> > port? What I want to do is have my website running
> > on
> > Apache web server or port 80 and also have Tomcat
> > running on port 80. That way my web service
> requests
> > do not need to go through Apache web server where
> > they
> > are redirected to Tomcat.
> > I am trying to avoid web service requests going to
> a
> > different port on the client side and getting
> > stopped
> > by a proxy but perhaps that does not stop http
> > requests going another site on port say 81?
> > 
> > Thanks,
> > -Tony
> > 
> > 
> > 
> >
>
____________________________________________________________________________________
> > Need a vacation? Get great deals
> > to amazing places on Yahoo! Travel.
> > http://travel.yahoo.com/
> > 
> >
>
---------------------------------------------------------------------
> > 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
> > 
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> Yahoo! oneSearch: Finally, mobile search 
> that gives answers, not web links. 
>
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
> 
>
---------------------------------------------------------------------
> 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
> 
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

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


Re: [users@httpd] Tomcat and Apache on the same port?

Posted by Da...@Notes.YMP.GOV.
Tony,

Yes.  One physical server and/or network card can support multiple IP 
addresses.  What OS is this?  When you say LAN, is this a corporate LAN or 
a home/isp LAN?  Which versions of apache and tomcat?  proxy_ajp and 
mod_jk are the same thing, only proxy_ajp is for apache 2.2+ and mod_jk 
pre-2.2.

Ok, before we can do anything, you'll need a second static IP address for 
your server.  Then, it needs to get configured on your server.  I'm more 
of a Unix guy, but maybe someone else out here could help out if your 
running windows.

After that...

In apache, you likely have a:

Listen 80

somewhere.  You can change that to:

Listen <ip-address1>:80

without the '<', '>', so that apache will only list on that 
ip-address/port combination.

Likewise, in tomcat, you likely have something like:

<Connector port="80" ...

you can add an address parameter to specify an ip address, like:

<Connector port="80" address="<ip-address2>" ...

Have you ever used the 'netstat' command?  On windows, something like:

netstat -nap tcp

will output something like:

Active Connections

  Proto  Local Address          Foreign Address        State
        .
        .
        .
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
        .
        .
        .

or on Unix (at least Sun Solaris 10) something like:

netstat -naf inet

On Unix, you might see '*', instead of 0.0.0.0, but they both mean the 
same thing, all address on the server.  If you run netstat before make the 
above apache/tomcat changes, you would see:

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING

after the changes, it should look like:

  TCP    <ip-address1>:80             0.0.0.0:0              LISTENING
  TCP    <ip-address2>:80             0.0.0.0:0              LISTENING




Please respond to users@httpd.apache.org

To:     users@httpd.apache.org
cc:      (bcc: Dan Mitton/YD/RWDOE)
Subject:        Re: [users@httpd] Tomcat and Apache on the same port?
LSN: Not Relevant
User Filed as: Not a Record

Hi Dan,

Thanks for the response. So I can have different IP's
for the same physical server how would the client and
the router handle that? I have a static address for my
server on the lan and I redirect my request for port
80 to that IP. What decides the IP to send a request
to the web server versus the Tomcat servlet container?

Sounds good but I am trying to sort through the
details for that configuration.

Also, I am already sending requests to Tomcat via
mod_jk in Apache so not sure what the advantages are
of proxy_ajp.

Many Thanks,
-Tony

--- Dan_Mitton@Notes.YMP.GOV wrote:

> Tony,
> 
> The only way to have two services use/listen on the
> same port is to use 
> two different IP addresses, one for each.  Then each
> can listen on port 
> 80.
> 
> A possible, very high effort, alternative would be
> to write a program that 
> would sit in front of both apache and tomcat, that
> could examine the 
> incoming packets and determine to route it to apache
> or tomcat based on 
> the packet content.  I'm talking a very complicated
> program here.
> 
> Apache proxying requests through to tomcat is not
> that expensive overhead 
> wise.  That would really be your best solution. 
> Look at the proxy_ajp 
> module in apache 2.2
> 
> Dan
> 
> 
> 
> Please respond to users@httpd.apache.org
> 
> To:     Tomcat Users Group <us...@tomcat.apache.org>
> cc:     Apache Mailing List <us...@httpd.apache.org>
> (bcc: Dan 
> Mitton/YD/RWDOE)
> Subject:        [users@httpd] Tomcat and Apache on
> the same port?
> LSN: Not Relevant
> User Filed as: Not a Record
> 
> Hi All,
> 
> Is it possible to run Tomcat and Apache on the same
> port? What I want to do is have my website running
> on
> Apache web server or port 80 and also have Tomcat
> running on port 80. That way my web service requests
> do not need to go through Apache web server where
> they
> are redirected to Tomcat.
> I am trying to avoid web service requests going to a
> different port on the client side and getting
> stopped
> by a proxy but perhaps that does not stop http
> requests going another site on port say 81?
> 
> Thanks,
> -Tony
> 
> 
> 
>
____________________________________________________________________________________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
> 
>
---------------------------------------------------------------------
> 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
> 
> 



 
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

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


Re: [users@httpd] Tomcat and Apache on the same port?

Posted by Tony Anecito <ad...@yahoo.com>.
Hi Dan,

Thanks for the response. So I can have different IP's
for the same physical server how would the client and
the router handle that? I have a static address for my
server on the lan and I redirect my request for port
80 to that IP. What decides the IP to send a request
to the web server versus the Tomcat servlet container?

Sounds good but I am trying to sort through the
details for that configuration.

Also, I am already sending requests to Tomcat via
mod_jk in Apache so not sure what the advantages are
of proxy_ajp.

Many Thanks,
-Tony

--- Dan_Mitton@Notes.YMP.GOV wrote:

> Tony,
> 
> The only way to have two services use/listen on the
> same port is to use 
> two different IP addresses, one for each.  Then each
> can listen on port 
> 80.
> 
> A possible, very high effort, alternative would be
> to write a program that 
> would sit in front of both apache and tomcat, that
> could examine the 
> incoming packets and determine to route it to apache
> or tomcat based on 
> the packet content.  I'm talking a very complicated
> program here.
> 
> Apache proxying requests through to tomcat is not
> that expensive overhead 
> wise.  That would really be your best solution. 
> Look at the proxy_ajp 
> module in apache 2.2
> 
> Dan
> 
> 
> 
> Please respond to users@httpd.apache.org
> 
> To:     Tomcat Users Group <us...@tomcat.apache.org>
> cc:     Apache Mailing List <us...@httpd.apache.org>
> (bcc: Dan 
> Mitton/YD/RWDOE)
> Subject:        [users@httpd] Tomcat and Apache on
> the same port?
> LSN: Not Relevant
> User Filed as: Not a Record
> 
> Hi All,
> 
> Is it possible to run Tomcat and Apache on the same
> port? What I want to do is have my website running
> on
> Apache web server or port 80 and also have Tomcat
> running on port 80. That way my web service requests
> do not need to go through Apache web server where
> they
> are redirected to Tomcat.
> I am trying to avoid web service requests going to a
> different port on the client side and getting
> stopped
> by a proxy but perhaps that does not stop http
> requests going another site on port say 81?
> 
> Thanks,
> -Tony
> 
> 
>  
>
____________________________________________________________________________________
> Need a vacation? Get great deals
> to amazing places on Yahoo! Travel.
> http://travel.yahoo.com/
> 
>
---------------------------------------------------------------------
> 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
> 
> 



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

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


Re: [users@httpd] Tomcat and Apache on the same port?

Posted by Da...@Notes.YMP.GOV.
Tony,

The only way to have two services use/listen on the same port is to use 
two different IP addresses, one for each.  Then each can listen on port 
80.

A possible, very high effort, alternative would be to write a program that 
would sit in front of both apache and tomcat, that could examine the 
incoming packets and determine to route it to apache or tomcat based on 
the packet content.  I'm talking a very complicated program here.

Apache proxying requests through to tomcat is not that expensive overhead 
wise.  That would really be your best solution.  Look at the proxy_ajp 
module in apache 2.2

Dan



Please respond to users@httpd.apache.org

To:     Tomcat Users Group <us...@tomcat.apache.org>
cc:     Apache Mailing List <us...@httpd.apache.org> (bcc: Dan 
Mitton/YD/RWDOE)
Subject:        [users@httpd] Tomcat and Apache on the same port?
LSN: Not Relevant
User Filed as: Not a Record

Hi All,

Is it possible to run Tomcat and Apache on the same
port? What I want to do is have my website running on
Apache web server or port 80 and also have Tomcat
running on port 80. That way my web service requests
do not need to go through Apache web server where they
are redirected to Tomcat.
I am trying to avoid web service requests going to a
different port on the client side and getting stopped
by a proxy but perhaps that does not stop http
requests going another site on port say 81?

Thanks,
-Tony


 
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

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