assume this Apache 
URLhttp://systemname:port/server1/example/samples/ExampleServlet then to map 
ALL subdomains and pages under example to SystemWorker1 (To Tomcat) issue this 
JKMount
JkMount /example/* System1worker on ApacheServer be careful to chmod +r+x for 
ALL urls underhttp://systemname:port/server1/example/ 
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaie/rzaiemod_jk.htm 
Cheers
Martin 
______________________________________________ 
Please do not alter or disrupt this communication..Thank You
 > Date: Thu, 29 Nov 2012 15:33:59 +0100
> From: a...@ice-sa.com
> To: users@tomcat.apache.org
> Subject: Re: Logfile noise, mod_jk, Apache 2.2, "Uri * is invalid. Uri must 
> start with /"
> 
> Patrick Middleton wrote:
> > Hi folks,
> > 
> > I'm working with recent builds/installations of
> > Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.4.11/PPC
> > Apache 2.2.22 with mod_jk 1.2.37 on MacOSX 10.8.2/x86_64
> > connecting to Tomcat 5.5.7 (from binary distribution) running on MacOSX 
> > 10.4.11.
> > 
> > What I am finding is lots of log entries such as this one in 
> > /var/log/apache2/mod_jk.log:
> > [Thu Nov 29 12:17:14.422 2012] [38496:140733193388032] [warn] 
> > map_uri_to_worker_ext::jk_uri_worker_map.c (1057): Uri * is invalid. Uri 
> > must start with /
> > 
> > corresponding to this one in /var/log/apache2/access_log:
> > ::1 - - [29/Nov/2012:12:17:14 +0000] - - - "OPTIONS * HTTP/1.0" 200 - 
> > "-" "Apache/2.2.22 (Unix) DAV/2 mod_jk/1.2.37 mod_ssl/2.2.22 
> > OpenSSL/0.9.8x (internal dummy connection)"
> > 
> > 
> > My understanding is that this is the Apache master instance running as 
> > root is polling its spare/worker processes to check that they're alive 
> > and I have tracked this down to server/mpm_common.c in the Apache 2.2 
> > sources.
> > 
> > I'm not an Apache internals expert.  I'm not really even that good at 
> > configuring Apache.  I have:
> > <IfModule jk_module>
> >     JkWorkersFile /etc/apache2/workers.properties
> >     JkShmFile /private/var/run/jk-apache2.shm
> >     JkLogFile /private/var/log/apache2/mod_jk.log
> >     JkLogLevel info
> >     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> >     JkRequestLogFormat "%w %V %T %s %r"
> >     JKMount "/TomcatApplications/*" worker1
> >     JkMountCopy All
> > </IfModule>
> > 
> > so I don't see how the heartbeat request is being processed by the 
> > jk_module handler.  Possibly my diligent use of Google to find how to 
> > configure apache 2.2 to stop this has not been diligent enough.  
> > Suggestions for additional Apache configuration directives are welcome.
> > 
> > Would it be reasonable to change the sources for mod_jk to not log a 
> > warning when the URI is * and the method is OPTIONS and the remote 
> > address is localhost?
> > 
> 
> Hi.
> Thanks for the detailed and complete info, it simplifies responses.
> I basically agree with you in not understanding why mod_jk, with the single 
> mapping
>  >     JKMount "/TomcatApplications/*" worker1
> would believe that a request "OPTIONS *" applies to it, and would 
> consequently mumble in 
> the logfile.
> 
> I would let the resident mod_jk expert answer that one.
> 
> But to avoid the messages in the meantime, you could try the following :
> 
> 1) comment out the following JkMount and JkMountCopy lines :
>  > <IfModule jk_module>
>  >     JkWorkersFile /etc/apache2/workers.properties
>  >     JkShmFile /private/var/run/jk-apache2.shm
>  >     JkLogFile /private/var/log/apache2/mod_jk.log
>  >     JkLogLevel info
>  >     JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>  >     JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>  >     JkRequestLogFormat "%w %V %T %s %r"
> #     JKMount "/TomcatApplications/*" worker1
> #     JkMountCopy All
>  > </IfModule>
> 
> 2) add a section to your Apache httpd configuration :
> <Location /TomcatApplications/>
>    <Limit GET POST>
>      SetHandler jakarta-servlet
>      SetEnv JK_WORKER_NAME worker1
>    </Limit>
> </Location>
> 
> Honestly, I have no idea if a <Limit> section would do the trick here. But 
> you can always 
> try it.
> If it works like I expect, the above means :
> - for any request URL which matches ^/TomcatApplications/
> - only if the method is GET or POST
> - set mod_jk as the Apache response handler
> - and set the mod_jk "worker" to worker1
> If the method is not GET or POST, do nothing, meaning let the request be 
> served by the 
> default Apache response handler (which would complain if this was other than 
> OPTIONS, 
> because it would not find the path on disk).
> 
> 
> 
> Reference : http://tomcat.apache.org/connectors-doc/reference/apache.html
> Section : Using SetHandler and Environment Variables
> and
> http://httpd.apache.org/docs/2.2/mod/core.html#limit
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
                                          

Reply via email to