Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
jk_mod and binding tomcat 's root to an apache directory

jk_mod and binding tomcat 's root to an apache directory

2007-11-04       - By Rainer Jung

 Back
Reply:     1     2     3     4     5     6     7     8  



Shug Boabby schrieb:
> Thanks Rainer... I've added the JK debugging and this has helped
> identify a problem... the response that Apache gets (and doesn't forward
> to the client) is that "No host matches server name myserver.com".

Tomcat gets the host name from the forwarded Host header. Are you using
vhosts in Tomcat, or are you using more or less the default config
(which I hope for the first step). In the default config, it should not
be a problem, that there is no Host named myserver.com defined in
server.xml.

There should be a line in the jk debug log similar to:

[debug] init_ws_service::mod_jk.c (806): Service protocol=HTTP/1.1
method=GET host=(null) addr=127.0.0.1 name=localhost port=8001
auth=(null) user=(null) laddr=127.0.0.1 raddr=127.0.0.1
uri=/unrelated/page/on/my/site

Check the uri, that's the one we send to Tomcat. Check the Tomcat logs,
if they show an error. Try to send the same request directly to Tomcat
via its http connector.

> I'm not seeing any output at all in the RewriteLog (btw, it's RewriteLog
> not RewriteLogFile). I'm using Apache 2.2.5.

Sorry. Concerning the empty log file: if you are using virtual hosts,
define the rewrite directives in the vhost. Especially the
"RewriteEngine On" should be in each vhost, that should use mod_rewrite.
Also the Rules are not automatically inherited, and by using individual
RewriteLog directives, you can define vhost private log files and thus
check, which vhost handled your request.

> Apache httpd is running several virtual domains, so this is a reasonable
> response. However, JkMount worked fine despite this so it's a little
> puzzling. I don't have a clue how to fix it! Any ideas?
>
> Should I be concerned that the the JK log is completely full up of lines
> like this
>
> "Attempting to map URI '/unrelated/page/on/my/site' from 2 maps"
>
> every time I get an access request on my server... even though the pages
> have nothing to do with the JkMount points?

No, it's debug (non-production) and also shows us, how mod_jk tries to
decide, if it should forward the request. Those lines are the lines that
show, *if* any of the JkMounts match the URL.

> On 4 Nov 2007, at 15:41, Rainer Jung wrote:
>> Now we go into debugging mod_rewrite and mod_jk.
>>
>> RewriteLogFile logs/rewrite.log
>> RewriteLogLevel 9
>>
>> will give you information, what mod_rewrite does with your URL.
>>
>> JkLogFile logs/mod_jk.log
>> JkLogLevel debug
>>
>> will give us a lot of information, which URL gets passed to mod_jk, and
>> what it does with it.

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.