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.