LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-14-2014, 12:14 PM   #1
seamore
Member
 
Registered: Sep 2009
Posts: 83

Rep: Reputation: 1
Apache & Tomcat not connecting


I have set up Apache & tomcat to work in tandem before but this time I'm stumped.
Apache gives me a 404 Error when I try to access jsps.I have Apache 2.4.7 & Tomcat7.0.50

I have mod_jk.so in the Apache modules dir

In Apache httpd.conf I have:

LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
JkWorkersFile /usr/local/apache2/conf/workers.properties
JkMount /foo/* worker1

My workers.properties file reads:

qbash-2.05a# pico# Define 1 real worker using ajp13
worker.list=worker1

# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

Apache error log file reads:

[Sat Jun 14 08:44:01.282427 2014] [mpm_worker:notice] [pid 8074:tid 3070134016] AH00295: caught SIGTERM, shutting down
[Sat Jun 14 08:44:03.184266 2014] [jk:warn] [pid 8206:tid 3069900544] No JkLogFile defined in httpd.conf. Using default /usr/local/apache2/logs/mod_jk.log
[Sat Jun 14 08:44:03.184732 2014] [jk:warn] [pid 8206:tid 3069900544] No JkShmFile defined in httpd.conf. Using default /usr/local/apache2/logs/jk-runtime-status
[Sat Jun 14 08:44:03.195892 2014] [jk:warn] [pid 8207:tid 3069900544] No JkLogFile defined in httpd.conf. Using default /usr/local/apache2/logs/mod_jk.log
[Sat Jun 14 08:44:03.196257 2014] [jk:warn] [pid 8207:tid 3069900544] No JkShmFile defined in httpd.conf. Using default /usr/local/apache2/logs/jk-runtime-status
[Sat Jun 14 08:44:03.200324 2014] [mpm_worker:notice] [pid 8207:tid 3069900544] AH00292: Apache/2.4.7 (Unix) mod_jk/1.2.40 configured -- resuming normal operations
[Sat Jun 14 08:44:03.200377 2014] [core:notice] [pid 8207:tid 3069900544] AH00094: Command line: '/usr/local/apache2/bin/httpd'

mod_jk log reads:

[Sat Jun 14 08:44:03.185 2014] [8206:3069900544] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
[Sat Jun 14 08:44:03.196 2014] [8207:3069900544] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.40 initialized
 
Old 06-14-2014, 04:12 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
In Apache httpd.conf I have:

LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
JkWorkersFile /usr/local/apache2/conf/workers.properties
JkMount /foo/* worker1
Hi,,

You must put
Code:
JkMount /foo/* worker1
inside a <VirtualHost ...></VirtualHost> container.

Regards

Last edited by bathory; 06-14-2014 at 04:15 PM.
 
Old 06-14-2014, 04:28 PM   #3
seamore
Member
 
Registered: Sep 2009
Posts: 83

Original Poster
Rep: Reputation: 1
IT WORKED!!!

Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Tomcat 1.5&1.6 and Apache 2.1 & 2.2 chnlinux Linux - Newbie 1 12-04-2007 09:44 PM
connecting apache server with Tomcat 5 on Fedora mefrmdelhi Fedora 0 02-14-2007 12:42 AM
apache, tomcat & mod_jk jonathon Linux - General 1 06-29-2006 01:06 AM
connecting Apache 1.3.x and Tomcat 5.5: mod_jk [GOD]Anck Slackware 0 03-22-2005 09:27 AM
Tomcat 5.0.27 connecting to Apache 2 with jdk 1.2.6 yea420 Linux - Newbie 0 08-13-2004 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration