Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Apache + Tomcat integration - please help!

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Apache+PHP+Tomcat - Hi, I need to set up to web on ONE host. One is written in PHP and the second in JSP. I thought that setting different virtual host names for those apps will be enough. Some how I have failed to do it properly. Either one or..

Tomcat 4 and Apache - Hello all. I worked with Apache and Tomcat 3 for a while but never got around to Tomcat 4. My question is how do Apache and Tomcat 4 work together? Is Tomcat 4 a web and app server in one, or maybe Apache has to be to send requests to..

Apache--->Tomcat problem - Hi, The problem is as follows: IE ---> Apache ---> Tomcat This is what I write down in a web browser: and this is what tomcat gets: Can someone tell me what should I change in Apache server..

unix > Apache > Tomcat - I am tomcat on a solaris9 box runnign I placed the following command in the script export To make sure that the JAVA_HOME variable is set to the correct location. (Is..

Apache+Tomcat+Cocoon - Anyone ever get those 3 release ever work? I got works fine. But I can't get Cocoon to work. All I got when I did is a directory listing. Helps are greatly PS: Its too confusing to..
Next:  Apache: Replacing port 80 and updating the firewall?  
Author Message
nobody21

External


Since: Sep 16, 2003
Posts: 5



(Msg. 1) Posted: Wed Sep 17, 2003 1:51 am
Post subject: Apache + Tomcat integration - please help!
Archived from groups: alt>apache>configuration, others (more info?)

Hello,

I've spent a few days trying to get Apache and Tomcat work together via JK
module. First I followed the following HOWTO link:

http://www.johnturner.com/howto/winxp-howto.html

and managed to get Tomcat static html page load from Apache server without
specifying 8080 port, like this:

http://localhost/examples/

But when I substituted the IP address of the server host instead of
"localhost" (i.e. http://192.168.1.250/examples/), port 80 was not
redirected to 8080, and Tomcat page did not come up.

Then I tried another link:

http://www.greenfieldresearch.ca/technical/jk2_config.html

with the same end result: using "localhost" in the URL works. Using the IP
address does not.

And it all happens on the same host where both Apache and Tomcat run.

My environment: Windows 2000 Pro
Apache 2.0.47
Tomcat 4.1.27

Any help will be greatly appreciated.

Alex Molochnikov
Gestalt Corporation

 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
user2522

External


Since: Oct 22, 2003
Posts: 4



(Msg. 2) Posted: Wed Oct 22, 2003 2:20 pm
Post subject: Re: Apache + Tomcat integration - please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello Alex,

I have exactly the same environment and exactly the same problem!
And like you I followed the how-tos you mentioned!
I've been trying to get it work since 3 days now...

Have you found a solution yet?
Please let me know.
Yours,
Flo


Alexandr Molochnikov wrote:
 > Hello,
 >
 > I've spent a few days trying to get Apache and Tomcat work together via JK
 > module. First I followed the following HOWTO link:
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.johnturner.com/howto/winxp-howto.html</font" target="_blank">http://www.johnturner.com/howto/winxp-howto.html</font</a>>
 >
 > and managed to get Tomcat static html page load from Apache server without
 > specifying 8080 port, like this:
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://localhost/examples/</font" target="_blank">http://localhost/examples/</font</a>>
 >
 > But when I substituted the IP address of the server host instead of
 > "localhost" (i.e. <a style='text-decoration: underline;' href="http://192.168.1.250/examples/" target="_blank">http://192.168.1.250/examples/</a>), port 80 was not
 > redirected to 8080, and Tomcat page did not come up.
 >
 > Then I tried another link:
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.greenfieldresearch.ca/technical/jk2_config.html</font" target="_blank">http://www.greenfieldresearch.ca/technical/jk2_config.html</font</a>>
 >
 > with the same end result: using "localhost" in the URL works. Using the IP
 > address does not.
 >
 > And it all happens on the same host where both Apache and Tomcat run.
 >
 > My environment: Windows 2000 Pro
 > Apache 2.0.47
 > Tomcat 4.1.27
 >
 > Any help will be greatly appreciated.
 >
 > Alex Molochnikov
 > Gestalt Corporation
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
ge0rge

External


Since: Oct 22, 2003
Posts: 12



(Msg. 3) Posted: Wed Oct 22, 2003 2:20 pm
Post subject: Re: Apache + Tomcat integration - please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Florian Laabs" <Florian.Laabs.RemoveThis@web.de> wrote
 > Alexandr Molochnikov wrote:
....
  > > But when I substituted the IP address of the server host instead of
  > > "localhost" (i.e. <a style='text-decoration: underline;' href="http://192.168.1.250/examples/" target="_blank">http://192.168.1.250/examples/</a>), port 80 was not
  > > redirected to 8080, and Tomcat page did not come up.
  > >
  > > Then I tried another link:
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.greenfieldresearch.ca/technical/jk2_config.html</font" target="_blank">http://www.greenfieldresearch.ca/technical/jk2_config.html</font</a>>
  > > with the same end result: using "localhost" in the URL works. Using the
IP
  > > address does not.

Does Apache itself (not Tomcat) return static pages when you specify the
local machine IP address? eg. pages held in Apache's ../htdocs folder.

Just a shot in the dark ... Have you configured the hosts file on your
system? It should have at least a couple of entries like -
127.0.0.1 localhost # for loopback
192.168.1.250 perseus # some name for my machine

ge0rge
--
Changing husbands/wives is only changing troubles.
-- Kathleen Norris<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
user2522

External


Since: Oct 22, 2003
Posts: 4



(Msg. 4) Posted: Wed Oct 22, 2003 3:09 pm
Post subject: Re: Apache + Tomcat integration - please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes, it does.
And the hosts file looks like that.

Florian


ge0rge wrote:
 > "Florian Laabs" <Florian.Laabs.DeleteThis@web.de> wrote
 >
  >>Alexandr Molochnikov wrote:
 >
 > ...
 >
   >>>But when I substituted the IP address of the server host instead of
   >>>"localhost" (i.e. <a style='text-decoration: underline;' href="http://192.168.1.250/examples/" target="_blank">http://192.168.1.250/examples/</a>), port 80 was not
   >>>redirected to 8080, and Tomcat page did not come up.
   >>>
   >>>Then I tried another link:
   >>>http://www.greenfieldresearch.ca/technical/jk2_config.html
   >>>with the same end result: using "localhost" in the URL works. Using the
 >
 > IP
 >
   >>>address does not.
 >
 >
 > Does Apache itself (not Tomcat) return static pages when you specify the
 > local machine IP address? eg. pages held in Apache's ../htdocs folder.
 >
 > Just a shot in the dark ... Have you configured the hosts file on your
 > system? It should have at least a couple of entries like -
 > 127.0.0.1 localhost # for loopback
 > 192.168.1.250 perseus # some name for my machine
 >
 > ge0rge
 > --
 > Changing husbands/wives is only changing troubles.
 > -- Kathleen Norris
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
ge0rge

External


Since: Oct 22, 2003
Posts: 12



(Msg. 5) Posted: Thu Oct 23, 2003 12:55 am
Post subject: Re: Apache + Tomcat integration - please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > ge0rge wrote:
....
  > > Just a shot in the dark ... Have you configured the hosts file on your
  > > system? It should have at least a couple of entries like -
  > > 127.0.0.1 localhost # for loopback
  > > 192.168.1.250 perseus # some name for my machine

"Florian Laabs" <Florian.Laabs DeleteThis @web.de> wrote in message
news:bn5ku6$sv4kc$1@ID-155046.news.uni-berlin.de...
 > Yes, it does.
 > And the hosts file looks like that.

woo hoo ... Got it to work! Basically the answer was in John Turner's howto
....
NOTE: in Tomcat, virtual hosts are "Hosts". That is, as far as Tomcat is
concerned, localhost is a virtual host. So, if you want to setup
<a style='text-decoration: underline;' href="http://www.server-a.com" target="_blank">www.server-a.com</a> and <a style='text-decoration: underline;' href="http://www.server-b.com," target="_blank">www.server-b.com,</a> you just need more copies of the Host
container included in the default server.xml that comes with Tomcat.

Here's a minimal cook book recipe -
1) make a copy of your Tomcat server.xml (safety first!)
2) edit server.xml and duplicate the xml Host tag to create another virtual
host
<Host name="localhost" ...> ... </Host>
That's some 150 lines and are found just after this line <!-- Define the
default virtual host -->
3) Now, in your new virtual host, you need to replace at least these two
references to localhost with perseus (or whatever you've called your
192.168.1.250 machine)-
a) <Host name="perseus" debug="0" ...
b) <value>perseus</value>
4) Stop Apache - stop Tomcat - start Tomcat - start Apache in that order...
and Bob's your uncle.

Now, <a style='text-decoration: underline;' href="http://localhost/examples/jsp/index.html" target="_blank">http://localhost/examples/jsp/index.html</a> or <a style='text-decoration: underline;' href="http://perseus/..." target="_blank">http://perseus/...</a> or
<a style='text-decoration: underline;' href="http://192.168.1.250/..." target="_blank">http://192.168.1.250/...</a> all work. Of course, on a production Tomcat, you'd
need to mess around a bit more with the xml file to tailor the additional
virtual host(s) to point to the correct directories as needed.

ge0rge
--
Leave no stone unturned.
-- Euripides<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
user2522

External


Since: Oct 22, 2003
Posts: 4



(Msg. 6) Posted: Fri Oct 24, 2003 12:18 pm
Post subject: Re: Apache + Tomcat integration - please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi geOrge,

must be something else, I already did that before and it does not work.

Flow



 > Now, <a style='text-decoration: underline;' href="http://localhost/examples/jsp/index.html" target="_blank">http://localhost/examples/jsp/index.html</a> or <a style='text-decoration: underline;' href="http://perseus/..." target="_blank">http://perseus/...</a> or
 > <a style='text-decoration: underline;' href="http://192.168.1.250/..." target="_blank">http://192.168.1.250/...</a> all work. Of course, on a production Tomcat, you'd
 > need to mess around a bit more with the xml file to tailor the additional
 > virtual host(s) to point to the correct directories as needed.
 >
 > ge0rge
 > --
 > Leave no stone unturned.
 > -- Euripides
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
user2522

External


Since: Oct 22, 2003
Posts: 4



(Msg. 7) Posted: Fri Oct 24, 2003 12:21 pm
Post subject: Re: Apache + Tomcat integration - please help! [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Me again geOrge,

I guess it must have something to do with the workers file.
Can you show yours?

Thx,
Flow

 > Now, <a style='text-decoration: underline;' href="http://localhost/examples/jsp/index.html" target="_blank">http://localhost/examples/jsp/index.html</a> or <a style='text-decoration: underline;' href="http://perseus/..." target="_blank">http://perseus/...</a> or
 > <a style='text-decoration: underline;' href="http://192.168.1.250/..." target="_blank">http://192.168.1.250/...</a> all work. Of course, on a production Tomcat, you'd
 > need to mess around a bit more with the xml file to tailor the additional
 > virtual host(s) to point to the correct directories as needed.
 >
 > ge0rge
 > --
 > Leave no stone unturned.
 > -- Euripides
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache + Tomcat integration - please help! 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]