473,587 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6221
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\hos ts 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******** ***********@new s2.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>perseu s</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
3274
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 Authentication. I have a security constraint restricting access to the application so that when I attempt to access the app I am redirected to the login...
5
27975
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 another servlet - bean - jsp but I am hitting an error from tomcat that I have no idea why it is failing. I am getting an...
1
6909
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
11413
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 4.1.29/JBoss 3.0.7, mod_jk 2.0.43 on Solaris 9, Intranet environment. Everything is fine on the first instance, but on the second instance when I do...
0
6362
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 4.1.29/JBoss 3.0.7, mod_jk 2.0.43 on Solaris 9, Intranet environment. Everything is fine on the first instance, but on the second instance when I do...
11
2904
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 when trying to call my test.php file is a 404 error? http.config file: LoadModule php5_module "C:/php/php5apache2.dll" PHPIniDir "C:/php"...
2
2490
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 on this server so i can run and test some scripts, i've written. Can someone please direct me on how to do this? Or give me a link to HOWTO or a...
0
2703
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 other words Apache is on Port and 80 and Tomcat is on 8080. but when I type http://mydomain.com/MyWebContext/a_file_name.jsp I can see the jsp...
2
15695
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 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.