Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

mod_jk

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I do.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Dinner will be steamed monkey heads with a side of tiny ads.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic