• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

mod_jk  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem with using both Apache 2.2.3 and Tomcat 5.5.23 using mod_jk.
Basically when I type http://www.mywebsite.com I want it to go to http://ipaddress:8088/shop where shop is my webapp and it's in the shop dir under /usr/lib/apache-tomcat-5.5.23/webapps.
I tested that tomcat is working and http://ipaddress:8088/shop brings up the shop web app.
Here's what I've done:
-Downloaded and put mod_jk.so into /usr/lib/httpd/modules
-Created mod_jk.conf in /etc/httpd/conf.d with the following lines:

-Created workers.properties in /etc/httpd/conf with the following lines:

-Add virtual host in /etc/httpd/conf/httpd.conf as such:

192.168.0.2 is the internal ip for the website.
But I only see the Apache default after I restart both Apache and Tomcat and then type http://www.mywebsite.com.
So what did I do wrong or miss?
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have something like



in your tomcat's server.xml ?
 
Danny Luk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I do.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you need to set 'shop' as default app. You need to have something like this in server.xml within <Host>

<Context docBase="/usr/lib/apache-tomcat-5.5.23/webapps/shop" path="">
 
Danny Luk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added the context line like you said and it's the same when I restarted Apache.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Danny Luk wrote:I added the context line like you said and it's the same when I restarted Apache.



You have to restart Tomcat
 
Danny Luk
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I restarted both and ran http://ipaddress:8088/shop to make sure the app is running. But http://www.mywebsite.com still returns the Apache HTTP Server Test Page.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Danny Luk wrote:I restarted both and ran http://ipaddress:8088/shop to make sure the app is running. But http://www.mywebsite.com still returns the Apache HTTP Server Test Page.



In this case you have to solve one problem at a time. This part should not work at all.



Are you sure that you are seeing correct Apache HTTP Server Test Page. I mean it is Apache on 192.168.0.2:8088.
 
it's a teeny, tiny, wafer thin ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!