LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 01-12-2010, 05:29 AM   #1
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Rep: Reputation: 16
Question Apache Web Server + Tomcat 6 issues


Hi all,
I need to setup a connection between an Apache 1.3 web server and a Tomcat 6. Application runs perfectly fine via Tomcat, but, from Apache I cannot access the page, with error 403.

The Apache error log is:
Code:
[Tue Jan 12 12:17:50 2010] [error] [client 10.32.9.213] Directory index forbidden by rule: /home_usr/tomcat5_home/apache-tomcat-6.0.18/webapps/
The mod_jk.log is:
Code:
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] jk_set_time_fmt::jk_util.c (458): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] '
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_open::jk_uri_worker_map.c (770): rule map size is 1
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_add::jk_uri_worker_map.c (720): wildchar rule '/GoApp/*=tomcat6Worker' source 'JkMount' was added
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after map open: index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=1 nosize=0 capacity=4
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/GoApp/* worker=tomcat6Worker context=/GoApp/* source=JkMount type=Wildchar len=13
[Tue Jan 12 12:15:06.051 2010] [20158:0] [info] jk_init::mod_jk.c (2903): mod_jk/1.2.28 initialized
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] wc_get_worker_for_name::jk_worker.c (116): did not find a worker tomcat6Worker
[Tue Jan 12 12:15:06 2010] [20158:0] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'tomcat6Worker' in uri map post processing.
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after extension stripping: index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=1 nosize=0 capacity=4
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/GoApp/* worker=tomcat6Worker context=/GoApp/* source=JkMount type=Wildchar len=13
[Tue Jan 12 12:15:06 2010] [20158:0] [debug] uri_worker_map_switch::jk_uri_worker_map.c (482): Switching uri worker map from index 0 to index 1
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] jk_set_time_fmt::jk_util.c (458): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] '
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_open::jk_uri_worker_map.c (770): rule map size is 1
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_add::jk_uri_worker_map.c (720): wildchar rule '/GoApp/*=tomcat6Worker' source 'JkMount' was added
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after map open: index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=1 nosize=0 capacity=4
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/GoApp/* worker=tomcat6Worker context=/GoApp/* source=JkMount type=Wildchar len=13
[Tue Jan 12 12:15:09.180 2010] [20165:0] [info] jk_init::mod_jk.c (2903): mod_jk/1.2.28 initialized
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] wc_get_worker_for_name::jk_worker.c (116): did not find a worker tomcat6Worker
[Tue Jan 12 12:15:09 2010] [20165:0] [error] uri_worker_map_ext::jk_uri_worker_map.c (506): Could not find worker with name 'tomcat6Worker' in uri map post processing.
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after extension stripping: index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=1 nosize=0 capacity=4
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/GoApp/* worker=tomcat6Worker context=/GoApp/* source=JkMount type=Wildchar len=13
[Tue Jan 12 12:15:09 2010] [20165:0] [debug] uri_worker_map_switch::jk_uri_worker_map.c (482): Switching uri worker map from index 0 to index 1
[Tue Jan 12 12:17:47 2010] [20183:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/' from 1 maps
[Tue Jan 12 12:17:47 2010] [20183:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=tomcat6Worker' source 'JkMount'
[Tue Jan 12 12:17:47 2010] [20183:0] [debug] jk_translate::mod_jk.c (3081): no match for / found
[Tue Jan 12 12:17:47 2010] [20183:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/PS_modules.html' from 1 maps
[Tue Jan 12 12:17:47 2010] [20183:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=tomcat6Worker' source 'JkMount'
[Tue Jan 12 12:17:47 2010] [20183:0] [debug] jk_translate::mod_jk.c (3081): no match for /PS_modules.html found
[Tue Jan 12 12:17:50 2010] [20183:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/' from 1 maps
[Tue Jan 12 12:17:50 2010] [20183:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=tomcat6Worker' source 'JkMount'
[Tue Jan 12 12:17:50 2010] [20183:0] [debug] jk_translate::mod_jk.c (3081): no match for / found
[Tue Jan 12 12:17:50 2010] [20183:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/PS_modules.html' from 1 maps
[Tue Jan 12 12:17:50 2010] [20183:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=tomcat6Worker' source 'JkMount'
[Tue Jan 12 12:17:50 2010] [20183:0] [debug] jk_translate::mod_jk.c (3081): no match for /PS_modules.html found
Tomcat has no indication that the request reached it.

The Apache configuration file is:
Code:
LoadModule jk_module  libexec/mod_jk.so
AddModule  mod_jk.c
<VirtualHost *:80>
	ServerName test-go2.local
	DocumentRoot /home_usr/tomcat5_home/apache-tomcat-6.0.18/webapps
	ErrorDocument 500 "An error occured during service activation. Please try again later."
	ErrorDocument 404 "Page Not found error"
	ErrorDocument 403 "Page not allowed"

	TransferLog "|/usr/local/apache_1.3.26/src/support/rotatelogs /usr/local/apache_1.3.26/logs/go_access_log 86400"
	ErrorLog "|/usr/local/apache_1.3.26/src/support/rotatelogs /usr/local/apache_1.3.26/logs/go_error_log 86400"

	JkWorkersFile		/home_usr/tomcat5_home/apache-tomcat-6.0.18/conf/workers.properties
	JkShmFile			logs/mod_jk.shm
	JkLogFile			logs/mod_jk.log
	JkLogLevel			debug
	JkRequestLogFormat	"%w %V %T"
	JkLogStampFormat	"[%a %b %d %H:%M:%S %Y] "
	JkMount  /GoApp/*  tomcat6Worker
</VirtualHost>
The workers.properties file is:
Code:
workers.tomcat_home=/home_usr/tomcat5_home/apache-tomcat-6.0.18/
workers.java_home=/usr/jdk1.6.0_13/
workers.list=tomcat6Worker
worker.tomcat6Worker.type=ajp13
worker.tomcat6Worker.host=localhost
worker.tomcat6Worker.port=8090
worker.tomcat6Worker.socket_keepalive=0
Finally, the server.xml file is:
Code:
<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8089" shutdown="stop">

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener" />
  <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8088" protocol="HTTP/1.1"
		server="-"
		allowTrace="false"
		xpoweredBy="false"
		connectionTimeout="20000"
		redirectPort="8086" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the JSSE configuration, when using APR, the
         connector should be using the OpenSSL style configuration
         described in the APR documentation -->
	<Connector port="8086" protocol="org.apache.coyote.http11.Http11Protocol"
			   minSpareThreads="5" maxSpareThreads="25"
			   enableLookups="true"
			   disableUploadTimeout="false"
			   acceptCount="100" maxThreads="120"
			   SSLEnabled="true"
			   scheme="https"
			   secure="true"
			   keystoreFile="conf/certificates/tomcat6_keystore"
			   keystorePass="password"
			   clientAuth="false" sslProtocol="TLS"
	/>

    <!-- Define an AJP 1.3 Connector on port 8009 -->
	<Connector port="8090" protocol="AJP/1.3" redirectPort="58086" />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- The request dumper valve dumps useful debugging information about
           the request and response data received and sent by Tomcat.
           Documentation at: /docs/config/valve.html -->
      <!--
      <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
      -->

      <!-- This Realm uses the UserDatabase configured in the global JNDI
           resources under the key "UserDatabase".  Any edits
           that are performed against this UserDatabase are immediately
           available for use by the Realm.  -->
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>
		<Host name="test-go.local" appBase="webapps/" unpackWars="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
			<Context path="" docBase="GoApp" debug="0" reloadable="true" />
			<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="test-go-" suffix=".log" timestamp="true"/>
		</Host>
    </Engine>
  </Service>
</Server>
What am I doing wrong?
 
Old 01-12-2010, 09:32 AM   #2
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
From another forum I found that it is possible to have an issue with the worker name. User reported that the only worker name that actully did the trick was AJP. So, I modified the workers file to be:
Code:
workers.tomcat_home=/home_usr/tomcat5_home/apache-tomcat-6.0.18/
workers.java_home=/usr/jdk1.6.0_13/
workers.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8090
worker.ajp13.socket_keepalive=0
Now, mod_jk found the worker. However, I still have a 403 error no redirection to Tomcat.

The mod_jk log is:
Code:
[Tue Jan 12 16:21:39 2010] [5835:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/' from 1 maps
[Tue Jan 12 16:21:39 2010] [5835:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:21:39 2010] [5835:0] [debug] jk_translate::mod_jk.c (3081): no match for / found
[Tue Jan 12 16:21:39 2010] [5835:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/PS_modules.html' from 1 maps
[Tue Jan 12 16:21:39 2010] [5835:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:21:39 2010] [5835:0] [debug] jk_translate::mod_jk.c (3081): no match for /PS_modules.html found
[Tue Jan 12 16:21:45 2010] [5835:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/' from 1 maps
[Tue Jan 12 16:21:45 2010] [5835:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:21:45 2010] [5835:0] [debug] jk_translate::mod_jk.c (3081): no match for / found
[Tue Jan 12 16:21:45 2010] [5835:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/PS_modules.html' from 1 maps
[Tue Jan 12 16:21:45 2010] [5835:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:21:45 2010] [5835:0] [debug] jk_translate::mod_jk.c (3081): no match for /PS_modules.html found
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/' from 1 maps
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] jk_translate::mod_jk.c (3081): no match for / found
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/PS_modules.html' from 1 maps
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] jk_translate::mod_jk.c (3081): no match for /PS_modules.html found

Any help would be appreciated.
Thank you.
 
Old 01-13-2010, 03:17 AM   #3
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
Nobody?
 
Old 01-13-2010, 06:32 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
Did you remember to update JKMount in httpd.conf after you changed the workers file? Does PS_modules.html really exist in the deployed Tomcat application's ROOT directory?
 
Old 01-14-2010, 05:38 AM   #5
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
JKMount is updated, of course, I simply did not post the update.
PS_modules.html no, it does not exist. What is that page?
 
Old 01-14-2010, 02:26 PM   #6
infinitiguy
LQ Newbie
 
Registered: Feb 2008
Posts: 10

Rep: Reputation: 1
Quote:
Originally Posted by tpe View Post
JKMount is updated, of course, I simply did not post the update.
PS_modules.html no, it does not exist. What is that page?
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/GoApp/*=ajp13' source 'JkMount'
[Tue Jan 12 16:24:09 2010] [5837:0] [debug] jk_translate::mod_jk.c (3081): no match for /PS_modules.html found

PS_modules.html appears to be(from the logs) the page you're requesting on the appserver side. If it doesn't exist in the webapps root, then the logs are saying exactly what it's telling you. It can't find it.
 
Old 01-15-2010, 01:59 AM   #7
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
PS_modules.html is NOT the page I am looking for! That's for sure. And most important: The Apache error is not 404, but 403.
 
Old 01-15-2010, 06:38 AM   #8
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
I did one more test. I stopped Tomcat, and then, restarted Apache. I was expecting mod_jk to report that it cannot initialize a connection with ajp13. However, the only reports in the mod_jk.log were the opposite:
Code:
[info] jk_init::mod_jk.c (2903): mod_jk/1.2.28 initialized
I am sure that I miss something on the apache side, but I do not know what.
 
Old 01-15-2010, 06:57 AM   #9
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,973

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Hi,

What is the index page of your DocumentRoot? If it's index.jsp, you should add it in the DirectoryIndex directive

Regards
 
Old 01-15-2010, 07:21 AM   #10
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
And another test was performed: I modified the server.xml and now, AJP listens on port 8999. I left every other configuration file as it was and restarted tomcat (first) and then apache. mod_jk indicated that it found a worker! netstat show that Tomcat listens on 8999. What is wrong? Should I use another version of mod_jk? Is it a bug?

Code:
rule '/GoApp/*=ajp13' source 'JkMount' was added
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after map open: index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=1 nosize=0 capacity=4
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/GoApp/* worker=ajp13 context=/GoApp/* source=JkMount type=Wildchar len=13
[Fri Jan 15 14:15:09.434 2010] [7674:0] [info] jk_init::mod_jk.c (2903): mod_jk/1.2.28 initialized
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker ajp13
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type 'ajp13'
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checking extension for worker 0: ajp13 of type ajp13 (2)
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after extension stripping: index=0 file='(null)' reject_unsafe=0 reload=60 modified=0 checked=0
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=1 nosize=0 capacity=4
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/GoApp/* worker=ajp13 context=/GoApp/* source=JkMount type=Wildchar len=13
[Fri Jan 15 14:15:09 2010] [7674:0] [debug] uri_worker_map_switch::jk_uri_worker_map.c (482): Switching uri worker map from index 0 to index 1
 
Old 01-15-2010, 07:23 AM   #11
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
DocumentRoot has no index page, since it hosts web applications. In theory, as soon as I enter the http://test-go2.local
it should be redirected to http://test-go2.local/GoApp/, where I do have an index.jsp page...
 
Old 01-15-2010, 07:59 AM   #12
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,973

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
The fact that mod_jk reports that it has found a worker is not a bug. It means just that there is an ajp worker configured in apache. Changing the ajp connector port will result in apache not able to communicate with tomcat.

Anyway, I guess the 403 (Forbidden) error you get is because you don't have an index page. Try to rewrite DocumentRoot (inside the vhost definition part) and see if it works
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://test-go2.local/GoApp [L]
Make sure to undo the changes you've done for the ajp connector port

Regards

Last edited by bathory; 01-15-2010 at 08:03 AM.
 
Old 01-18-2010, 04:11 AM   #13
tpe
Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
I managed to "solve" them problem. Now, DocumentRoot points to the application directory (webapps/GoApp) with restrictions regarding the WEB-INF, META-INF, resources etc/. However, I feel that this is not correct, since the worker.properties file should direct apache on which folder it should use. In any case, I still try to find a more elegant solution.
Thank you, for the time being.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Please help with Apache Web Server / Apache Tomcat / PHP / Java / PHP-Java Bridge jpmad4it Linux - Server 2 01-05-2009 07:07 AM
Apache Tomcat 5.5 install issues. brave heart Red Hat 4 08-05-2007 10:46 PM
Tomcat as Web Server crazycondor Linux - Server 2 12-21-2006 08:00 AM
New Web Applications to Apache-Tomcat Web sarathmohan Linux - Software 0 10-02-2003 03:59 AM
Apache Tomcat web Server hardware config homyarb Linux - Software 2 04-16-2003 01:36 AM


All times are GMT -5. The time now is 08:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration