tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat Connector to Apache 2.2
Date Sun, 02 May 2010 16:42:26 GMT

Jie Sheng Chua wrote:
> Hi André and Juha,
> I edit my tomcat server.xml as describe. my tomcat and apache listed that
> the connector is started as in the log.
> But when i access ( with IE, "The
> webpage cannot be found" error is displayed.

Do yourself a favor, and in IE, in the settings, unclick the option for 
"use friendly error messages".
This way, you will see the page really sent back by the server, and not 
the internal built-in IE "friendly" error page, which is useless.

> When i access "", the page can
> be display.

Ok. This means that at least Tomcat can find the page.

Your Apache/mod_jk configuration also looks ok to me.


> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *apache2: error.log*
> [Sun May 02 23:02:33 2010] [notice] Apache/2.2.14 (Ubuntu) mod_jk/1.2.28
> configured -- resuming normal operations
> [Sun May 02 23:04:27 2010] [error] [client] File does not
> exist: /var/www/examples

The above can be 2 things :
a) either Apache is not even trying to pass this request to mod_jk
b) Apache passes the request to mod_jk, but mod_jk returns the request 
to Apache with the code DECLINE.
This would mean that mod_jk has examined the URL of the request, 
determined that it does not match any of its "JkMount", and decided this 
request is not for him and should be handled by Apache itself.
Then Apache tries to find (himself) the requested document under its own 
DocumentRoot, and it fails, so it returns a 404 Not Found response.

To find out more, increase the log level of mod_jk :

 > # Set the jk log level [debug/error/info]
 > JkLogLevel    info
JkLogLevel debug

Then retry and look at /var/log/apache2/mod_jk.log.
It will tell you, step by step, how it tries to match the request URL to 
one of its JkMount mappings.

Or it will tell nothing, and in that case we are in case (a) above.

One question : is does not look that way from the configuration you 
posted, but are you using VirtualHost(s) in Apache ?
If yes, then make sure that your JkMount directives are in the 
VirtualHost configuration section, or lookup the "JkMountCopy" 
directive. (JkMount's are not automatically inherited by VirtualHost 
sections, from the main httpd section).

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message