You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vi...@answare.fr on 2002/09/18 16:07:57 UTC

RE: Apache2 and Tomcat4 on different boxes

When did you have this error? When you type this URL :
    http://10.103.2.4/examples ?

If it is the case, I think it's normal, because your Apache Virtual Host is
just defined for 10.103.2.30.
And It seems to me strange, because you said that the @IP of the Apache
server is 10.103.2.4 and you have a virtual host listenning on the
10.103.2.30 @IP.
I don't understand what you want really do.

Hopes, it's pointed on your problem...

  -----Message d'origine-----
  De : Raj Mettai [mailto:rmettai@broward.edu]
  Envoye : mercredi 18 septembre 2002 15:26
  A : tomcat-user@jakarta.apache.org
  Objet : Re: Apache2 and Tomcat4 on different boxes


  thanks David,

  I have removed the workers.list parm from workers.properties and also
there was typo in my last email for DNS and IP address..

  Apache server 10.103.2 4(morphues.broward.edu)
  Tomcat server 10.103.2.30(neptune.broward.edu)

  Still, I am getting object not found error....apache is looking under
htdocs directory usr/local/apache/htdocs for /examples

  Attached are the latest conf files......

  thanks
  Raj





  >>> david@twocats.co.uk 09/18/02 05:08AM >>>
  Raj,

  I hope something fell out of your workers file on it's way to me ...

  You define the workers.list as using ajp12 and ajp13
  But there is no definition for ajp12...

  Also the host IP you give from the list below is the apache box.

  Your httpd.conf file seems OK though.

  David


  Raj Mettai wrote:

  > thanks Daniel for you response, I have tried the options you
  > suggested, tested telnet from apche to tomcat on port 8009, that
  > worked fine and also configured apache/tomcat on each box(and they are
  > working fine), then I have changed the host in workers.properties on
  > apache box to point to tomcat box, but that didn't work for me. Can
  > you please send me the config files(httpd.conf, workers.properties,
  > mod_jk.conf and server.xml) from both machines, may be I am missing
  > some simpe thing....Also I am attaching my config
  > files(httpd.conf,workers.properties from apache and server.xml from
  > tomcat box.
  >
  > apache server 10.103.2.30(neptune.broward.edu)
  > tomcat server 10.103.2.4(morpheus.broward.edu)
  > (both are running on solaris 8)
  >
  > thanks again
  >
  > -Raj
  >
  > >>> daniel.farinha@neuron.co.uk 09/15/02 07:53AM >>>
  > I had all kinds of problems getting apache to speak to a remote tomcat,
  > and most of them were on the apache side.
  > The only problem I had on the app (tomcat) server was having the
  > firewalls (yes there are 2 firewalls between the web and app server, a
  > dedicated firewall box and the iptables/chains running on the actual app
  > server) blocking port 8009.
  > You should also make sure that port 8009 is not blocked on the tomcat
  > box. An easy way to test this is have tomcat running and from your web
  > server just telnet into port 8009 of your tomcat box. You should
  > connect, otherwise you need to sort out firewall rules first.
  >
  > The problems I had on the apache side were basically not having mod_jk
  > work properly.
  > I found out that the best way of approaching the apache/tomcat on
  > different boxes task is to install and test apache/tomcat on each box
  > individually. When they both work, then just change your apache-side
  > workers.properties to point at the right host (by IP address worked for
  > me).
  >
  > Also, try just JkMount'ing /examples outside the Virtual Server block.
  > It's best to troubleshoot a pure mod_jk connectivity issue, excluding
  > stuff like vhost context mismatches.
  >
  > I now have apache 2.0.40 speak with a remote tomcat 4.1.10 via mod_jk2,
  > which I must say was easier to accomplish, simply because the 4.1.10
  > connectors source compiles a lot better.
  >
  > Regards
  >
  > Daniel Farinha
  >
  > -----Original Message-----
  > From: Raj Mettai [mailto:rmettai@broward.edu]
  > <mailto:rmettai@broward.edu%5D>
  > Sent: 13 September 2002 20:56
  > To: tomcat-user@jakarta.apache.org
  > Subject: RE: Apache2 and Tomcat4 on different boxes
  >
  >
  > Hi,
  >
  > I had hostname on server.xml and IP in workers.properties, I have
  > changed both to IP. But still, apache does not talk to tomcat. They work
  > fine when they are on the same box, also, do I need to stutdown port
  > 8080 on tomcat, because tomcat is accessible thru his port.
  >
  > Here are my latest config files......
  >
  > workers.properties
  > ------------------------------------------------------------------------
  > --------------
  > worker.ajp13.port=8009
  > worker.ajp13.host=neptune.broward.edu
  > worker.ajp13.type=ajp13
  > ------------------------------------------------------------------------
  > --------------
  > httpd.conf
  > ------------------------------------------------------------------------
  > -------------
  > <IfModule !mod_jk.c>
  >   LoadModule jk_module /usr/local/apache/modules/mod_jk.so
  > </IfModule>
  >
  > JkWorkersFile "/usr/local/apache/conf/workers.properties"
  > JkLogFile "/usr/local/apache/logs/mod_jk.log"
  >
  > JkLogLevel debug
  >
  > <VirtualHost morpheus.broward.edu>
  > ServerName morpheus.broward.edu
  >
  > JkMount /examples ajp13
  > JkMount /examples/* ajp13
  >
  > JkMount /manager ajp13
  > JkMount /manager/* ajp13
  >
  > JkMount /FCCSC ajp13
  > JkMount /FCCSC/* ajp13
  >
  > JkMount / ajp13
  > JkMount /* ajp13
  > </VirtualHost>
  > ------------------------------------------------------------------------
  > -------------
  >
  > server.xml(host param)
  > ------------------------------------------------------------------------
  > -------------
  >       <Host name="neptune.broward.edu" debug="0" appBase="webapps"
  > unpackWARs="true">
  >
  >         <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
  > append=
  > "true" />
  > ------------------------------------------------------------------------
  > -------------
  >
  > Thanks a lot
  >
  > -Raj
  >
  > >>> JTurner@AAS.com 09/13/02 03:18PM >>>
  >
  > You have to have the hostnames the same, all the way through. Don't mix
  > IP addresses and hostnames.
  >
  > Does worker.ajp13.host equal the Host element's name parameter in
  > server.xml on the Tomcat box?
  >
  > Also, does this app work with Tomcat on the same box?
  >
  > John
  >
  >
  > > -----Original Message-----
  > > From: Raj Mettai [mailto:rmettai@broward.edu]
  > <mailto:rmettai@broward.edu%5D>
  > > Sent: Friday, September 13, 2002 3:12 PM
  > > To: tomcat-user@jakarta.apache.org
  > > Subject: Apache2 and Tomcat4 on different boxes
  > >
  > >
  > > Hi all,
  > >
  > > Here is my apache and tomcat configuration.................
  > >
  > > apache installed on morpheus.broward.edu(10.103.2.4) and tomcat on
  > > neptune.broward.edu(10.103.2.30), I have copied the mod_jk.conf code
  > > from tomcat machine to apache httd.conf and also copied
  > > workers.properties to apache box and also modified the host parm to
  > > tomcat server.(both are running on solaris 8 using connector mod_jk).
  > >
  > > when I try to access the page from apache box, I am getting
  > > 404 error...
  > >
  > > Here is worker.properties files
  > > -------------------------------------------
  > >
  > > worker.ajp13.port=8009
  > >
  > > worker.ajp13.host=10.103.2.30
  > >
  > > worker.ajp13.type=ajp13
  > > -------------------------------------------
  > >
  > > and I have following code attached to httpd.conf at the end...
  > > --------------------------------------------------------------
  > > ---------
  > > <IfModule !mod_jk.c>
  > >   LoadModule jk_module /usr/local/apache/modules/mod_jk.so
  > > </IfModule>
  > >
  > > JkWorkersFile "/usr/local/apache/conf/workers.properties"
  > > JkLogFile "/usr/local/apache/logs/mod_jk.log"
  > >
  > > JkLogLevel info
  > >
  > > <VirtualHost 10.103.2.4>
  > >     ServerName morpheus.broward.edu
  > >
  > >     JkMount / ajp13
  > >     JkMount /* ajp13
  > >
  > >     JkMount /FCCSC ajp13
  > >     JkMount /FCCSC/* ajp13
  > >
  > >     JkMount /examples ajp13
  > >     JkMount /examples/* ajp13
  > >
  > >     JkMount /webdav ajp13
  > >     JkMount /webdav/* ajp13
  > >
  > >     JkMount /tomcat-docs ajp13
  > >     JkMount /tomcat-docs/* ajp13
  > >
  > >     JkMount /manager ajp13
  > >     JkMount /manager/* ajp13
  > > </VirtualHost>
  > >
  > > ____________________________________________________
  > >
  > >
  > >
  > > can somebody please help me here.................
  > >
  > >
  > > -Raj
  > >
  > >
  > >
  > >
  > >
  > > >>> rmettai@broward.edu 09/13/02 11:38AM >>>
  > > Hi all,
  > >
  > > Anybody has any suggestions on running Apache and tomcat on diff boxes
  >
  > > using mod_jk connector......?????????
  > >
  > >
  > > thank you..............
  > >
  > > -Raj
  > >
  > >
  > >
  > > >>> rmettai@broward.edu 09/12/02 03:08PM >>>
  > >
  > > Hi John,
  > >
  > > I have copied the mod_jk.conf  over to apache box (actually copied all
  >
  > > code to the end of httpd.conf). Also, copied workers.properties onto
  > > apache box and modified the host on workers.properties to FQDN of
  > > tomcat. After all these, when I access the page from apache box, I am
  > > getting 400 - Bad request error. Also, nothing is written to either
  > > apache or tomcat logs. I am attaching both, httpd.conf and server.xml
  > > files and also workers.properties...can you give me any suggestions on
  >
  > > this please...........
  > >
  > > thanks a lot....
  > >
  > > -Raj
  > >
  > >
  > >
  > > >>> JTurner@AAS.com 09/06/02 08:27AM >>>
  > >
  > > You don't, as far as I know.  You will need mod_jk.conf on the Apache
  > > box. In addition, you will need to change the "host" value in
  > > workers.properties
  > > to point to the FQDN of the machine hosting Tomcat.
  > >
  > > I guess you could always set up some sort of NFS share, and
  > > share out a
  > > location on the Tomcat server so that the Apache server can
  > > see it, but
  > > the
  > > simplest way is to start Tomcat, let it generate mod_jk.conf, and then
  > > just
  > > copy it over to the Apache box and HUP Apache.
  > >
  > > John
  > >
  > >
  > > > -----Original Message-----
  > > > From: Raj Mettai [mailto:rmettai@broward.edu]
  > <mailto:rmettai@broward.edu%5D>
  > > > Sent: Thursday, September 05, 2002 5:46 PM
  > > > To: tomcat-user@jakarta.apache.org
  > > > Subject: Apache2 and Tomcat4 or different machines...
  > > >
  > > >
  > > > Hi,
  > > >
  > > > I want to configure Apache2.0.39 with tomcat4.0.4 using
  > > > mod_jk both running on different machines (solaris8). How do
  > > > I specify the location of mod_jk.conf file in httpd.conf if
  > > > they are not on the same box.
  > > >
  > > > thanks
  > > >
  > > > -Raj
  > > >
  > >
  > > --
  > > To unsubscribe, e-mail:
  > > <ma...@jakarta.apache.org>
  > > For additional commands, e-mail:
  > > <ma...@jakarta.apache.org>
  > >
  >
  > --
  > To unsubscribe, e-mail:
  > <ma...@jakarta.apache.org>
  > For additional commands, e-mail:
  > <ma...@jakarta.apache.org>
  >
  >
  > --
  > To unsubscribe, e-mail:
  > <ma...@jakarta.apache.org>
  > For additional commands, e-mail:
  > <ma...@jakarta.apache.org>
  >
  >------------------------------------------------------------------------
  >
  >--
  >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
  >For additional commands, e-mail:
<ma...@jakarta.apache.org>
  >




  --
  To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
  For additional commands, e-mail:
<ma...@jakarta.apache.org>