• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Apache + Tomcat Configuration Problem

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to configure Apache and Tomcat in Solaris, my basic intention is to avoid giving port number in the URL. I think, I have configured every thing as of my knowledge based on the below link, but my tomcat server still expects port number,

http://johnturner.com/howto/apache2-tomcat4112-sol8-howto.html

I have configured the same thing in Windows it works fine,only difference is the port number, in windows I am pointing to the 80 port but in solaris I have given some other ports like 8381.

It will be very greatful, if any one can give solution for the above said problem.

Do I need to do any other extra configuration, due to this port change?

Thanks in advance.

Regards,

Venkat
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat will listen on any port you want it to. Since all http requests come in looking for port 80, you would have to point all that traffic to your tomcat listener on port 8381. You should be able to use a router or web server software to do this.
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Venkatesh Rajendran:
Hi,

I am trying to configure Apache and Tomcat in Solaris, my basic intention is to avoid giving port number in the URL. I think, I have configured every thing as of my knowledge based on the below link, but my tomcat server still expects port number,

http://johnturner.com/howto/apache2-tomcat4112-sol8-howto.html



Yes, that document is a good start on configuring an Apache-Tomcat connector. We got this to work on Solaris 9, here are the steps we used:

Get the mod_jk2 binary

# cd /tmp/src
# gunzip jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43.tar.gz
# gtar -xf jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43.tar
# cd jakarta-tomcat-connectors-jk2.0.2-solaris8-apache2.0.43
# cp mod_jk2-2.0.43.so /usr/local/apache2/modules
# cp jkjni.so /usr/local/apache2/modules

Edit httpd.conf

# for JK2 connector to Tomcat
LoadModule jk2_module modules/mod_jk2-2.0.43.so
JkSet config.file /usr/local/share/tomcat5/conf/workers2.properties
Alias /jsp-examples/ "/usr/local/share/tomcat5/webapps/jsp-examples/"
Alias /servlets-examples/ "/usr/local/share/tomcat5/webapps/servlets-examples/"

Set permissions
# cd /usr/local/share/
# chmod 755 tomcat5
# cd tomcat5
# chmod 755 webapps
# cd conf
# cp workers2.properties.minimal workers2.properties

Edit workers2.properties

change [uri:/admin]
to [uri:/admin/*]

change [uri:/manager]
to [uri:/manager/*]

change [uri:/jsp-examples]
to [uri:/jsp-examples/*]

change [uri:/servlets-examples]
to [uri:/servlets-examples/*]

add any other uri's you might need

Shutdown and restart Tomcat and Apache

try to use "http://your-server/jsp-examples without providing a port to test the config.
 
reply
    Bookmark Topic Watch Topic
  • New Topic