Hello all, I have opened this thread to try to help those who find problems using the tutorial I have made at: http://www.howtoforge.com/apache2_tomcat5_mod_jk_integration Please post in here your questions and we will all try to solve them. Fernando
You might have noticed that I did a little formatting on your Howto so that it fits into these guidelines: http://www.howtoforge.com/howto_formatting_guide
problem with apache webserver and tomcat integration Hi, I followed the exact steps given by you in http://www.howtoforge.com/apache2_tomcat5_mod_jk_integration trying to make tomcat and apache communicate. However when I typed http://host/jsp-examples, I got an Apache Tomcat error report, "HTTP status 404". I am not sure what I have done wrong. Any help on this would be appreciated. My config is Linux 3.2.3-53 Apache Web Server 2.0.46 Tomcat 4.1.29 Thanks ambika
I tried with trailing slash, but still getting the same error. The mod_jk.log file is empty, mod_jk.log.1 has lines similar to this, [Tue May 02 15:59:21 2006]worker1 host 0.020002 My workers.properties file is workers.tomcat_home=/usr/local/tomcat/ workers.java_home=/usr/java/j2sdk1.4.2_06/ ps=/ worker.list=worker1 worker.default.port=8009 worker.default.host=hostname worker.default.type=ajp13 worker.default.lbfactor=1 I replaced hostname with the real hostname.
Actually, the examples are located http://localhost:8080/jsp-examples/ instead of http://localhost/jsp-examples/ There is a link to those examples on the front page of your default tomcat index http://localhost:8080/ So the how-to should be updated with this error fix. Not sure if it is because I used apache-tomcat-5.5.17.tar.gz versus apache-tomcat-5.5.16.tar.gz or not...but that's the fix.
Hi leorulez, What happens when you point your browser to: http://localhost ??? Does your apache respond to the request? And when you point it to: http://localhost:8080 ??? What does it give you?
Hi Devnet, If this address http://localhost/jsp-examples/ is not working, it means your connection between apache 2 and tomcat 5 is not working. If you point you browser to http://localhost:8080/ this means you are not using the mod_jk connection, but just the tomcat 5. To make it work, no port numbers should be in the middle of your address. You should have the apache respond to http://localhost and tomcat to http://localhost/jsp-examples if you followed the manual. I haven´t tried it with apache-tomcat-5.5.17.tar.gz but I will do it as soon as I have some time.
Hi, With http://host, I get the main web page that we have developed. so apache web server is working fine. With http://host:8080, I get the default tomcat servlet engine page. Hence even tomcat as a stand alone works fine. I tried http://host/jsp-examples, and got an Apache Tomcat error report, "HTTP status 404". Is there any other way to verify whether the apache web server and the tomcat servlet engine both communicate with one another? Thanks
1) In http://host:8080/ can you try executing the examples? And do they work? 2) Can you post your /etc/apache2/workers.properties 3) The fifteen last lines of your /etc/apache2/apache2.conf
1) In http://host:8080/ both jsp examples and servlet examples are working 2) workers.properties file.. I have already posted this before. Let me post it again workers.tomcat_home=/usr/local/tomcat/ workers.java_home=/usr/java/j2sdk1.4.2_06/ ps=/ worker.list=worker1 worker.default.port=8009 worker.default.host=hostname worker.default.type=ajp13 worker.default.lbfactor=1 I replaced hostname with the real hostname (eg. abc.edu) 3) The fifteen last lines of your /etc/apache2/apache2.conf I assume this is httpd.conf But the last 15 lines are related to section 3: virtual hosts. I am posting the last few lines from Section 2: Main server configuration JkWorkersFile "/etc/httpd/workers.properties" JkLogFile "/etc/httpd/logs/mod_jk.log" JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send servlet for context / jsp-examples to worker named worker1 JkMount /jsp-examples worker1 # Send JSPs for context /jsp-examples/* to worker named worker1 JkMount /jsp-examples/* worker1 Thanks
If you followed the manual line by line you would see that in 2) the first two lines differ. workers.tomcat_home=/usr/local/tomcat/ workers.java_home=/usr/java/j2sdk1.4.2_06/ should be replaced by: workers.tomcat_home=/usr/lib/apache-tomcat workers.java_home=/usr/lib/jdk And in 3) I cannot see that you load the jk_module LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so Try to take some time and check again the manual line by line copying and pasting the commands and if it does not work then get back here. And since you are using httpd.conf this means you are not using Debian 3.1 so it might be a problem with your distro. In Debian we use apache2.conf for the configuration file.
I had workers.tomcat_home=/usr/local/tomcat/ workers.java_home=/usr/java/j2sdk1.4.2_06/ because these are the actual locations for tomcat and java in my server. Is it necessary to change those lines to the ones you specified?. In 3) I have the load module: LoadModule jk_module modules/mod_jk.so in httpd.conf along with the other LoadModules. And yes I am not using Debian but I thought this manual would work for RedHat too. Thanks for your help.
I am sorry leorulez but I haven´t had the time to play with RH. Maybe this manual could help you a bit more: http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html Have you ever tried Debian
Thanks..but I have tried that procedure already. I have'nt tried Debian..did'nt want to mess around with the server which already has RedHat
Step 7 I ran Step 6 fine but I get the following error on Step7 Code: make bash: make: command not found I followed your tutorial right to the word ... so I must be missing something ... Any help/assistance will be much appreciated! Thanks! chrno
a base install of any OS is likely not going to include 'make'. You might need to do the following: Code: apt-get install make On another note, I have actually written a similar Howto that you all may wish to cross reference: http://5dollarwhitebox.org/wiki/index.php/Howtos_Apache_Tomcat_with_Mod_JK I am waiting to get 'whitelisted' by one of the guys to that I can add the Howto here. Though this here article by fernandoch, it never hurts to read a couple different Howto's to get as much info as possible.
How do you mean that? Once you have a user account on HowetoForge (as you do), you can post tutorials. Have a look here: http://www.howtoforge.com/add_howto
What is your reason for commenting out php types? I uncommented them after completing the guide (great and easy guide by the way), and i don't see any problems yet.