473,388 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Apache + Tomcat integration - please help!

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/tec...k2_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
Jul 17 '05 #1
7 6212
Alex,

Redirection to the IP address will have some network dependancies.
- Are you validated via DHCP?
- Is this static address in your winnt\system32\drivers\etc\hosts file?
- Did you change Tomcat configuration to point port 80?
- Is IIS installed/running?

Hope this helps,
BobK

"Alexandr Molochnikov" <NOBODY@NO_SPAM.com> wrote in message
news:3u*******************@news2.telusplanet.net.. .
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/tec...k2_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


Jul 17 '05 #2
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:

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/tec...k2_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


Jul 17 '05 #3

"Florian Laabs" <Fl***********@web.de> wrote
Alexandr Molochnikov wrote:

....
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/tec...k2_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
Jul 17 '05 #4
Yes, it does.
And the hosts file looks like that.

Florian
ge0rge wrote:
"Florian Laabs" <Fl***********@web.de> wrote
Alexandr Molochnikov wrote:


...
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/tec...k2_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


Jul 17 '05 #5
> 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" <Fl***********@web.de> wrote in message
news:bn************@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
www.server-a.com and www.server-b.com, 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, http://localhost/examples/jsp/index.html or http://perseus/... or
http://192.168.1.250/... 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
Jul 17 '05 #6
Hi geOrge,

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

Flow
Now, http://localhost/examples/jsp/index.html or http://perseus/... or
http://192.168.1.250/... 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


Jul 17 '05 #7
Me again geOrge,

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

Thx,
Flow
Now, http://localhost/examples/jsp/index.html or http://perseus/... or
http://192.168.1.250/... 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


Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kevin Sagon | last post by:
I am running a J2EE Web App under Tomcat 4.1 with Apache 2.0 proxying requests. Everything is configured and working appropriately however I ran into a problem after configuring J2EE Form...
5
by: Grant Collins | last post by:
Hi I am writing a web based application as part of a small project that I am undertaking using servlets beans and jsp. I already have one servlet - bean - jsp page working and I have written...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
1
by: Oleg Konovalov | last post by:
Hi, I am trying to create 2 separate environments (dev and test) on one powerful Unix server which has 2 network cards, 2 IP addresses, 2 server names... Using Apache 2.0.43 and Tomcat...
0
by: Oleg Konovalov | last post by:
Hi, I am trying to create 2 separate environments (dev and test) on one powerful Unix server which has 2 network cards, 2 IP addresses, 2 server names... Using Apache 2.0.43 and Tomcat...
11
by: gregsands | last post by:
Hi Im trying to install PHP 5.05 on Windows XP running Apache 2.0.54 Apache is running fine and ive made all the changes to the pnp.ini file and Apache config file, restarted Apache but all I get...
2
by: abshirf2 | last post by:
Hello all, I am really confused, please help! :( I have tomcat 5.5 installed on my machine and i have the JDK/JRE installed. Everything is working fine. Now what i want to do is install php...
0
ak1dnar
by: ak1dnar | last post by:
Hi Guys, I am using a virtual private server which runs Linux OS in it. On the server Apache and Tomcat has installed and to the best of my knowledge mod_jk also installed and working perfectly. In...
2
by: ramprakashjava | last post by:
sorry still that error exist , how to avoid this deprecated method overriding in my netbeans ! In Bundled tomcat log it shows Dec 30, 2009 9:03:45 PM...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.