tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Wagner" <>
Subject RE: mod_jk and apache virtual hosting (fwd)
Date Thu, 24 Apr 2003 01:23:10 GMT
Try moving the JkMount directive into the virtual host definition.  Be sure to keep the JkWorkersFile
directive OUTSIDE the virtual host (this will break mod_jk and give some cryptic errors).

Not sure if you need the JkWorkersFile loaded before you use the JkMount directive, but it
certainly won't hurt.

I've got a setup similar to what you're trying to do.  Here's the relevant portion of my httpd.conf

<VirtualHost *>
    ServerName anvil
    ServerAlias twiki twikistage
    DocumentRoot "/data2/production/"

<IfDefine HAVE_JK>
    JkWorkersFile conf/

<VirtualHost *>
    ServerName ash2
    DocumentRoot /data2/java/jakarta-tomcat-4.0.4/webapps/ROOT/
    <IfDefine HAVE_JK> 
        JkLogFile /data2/production/apache/logs/mod_jk.log
        JkLogLevel error
        JkMount /* ash_worker

-----Original Message-----
From: Dmitry Volodkovich []
Sent: Wednesday, April 23, 2003 6:11 PM
Subject: mod_jk and apache virtual hosting (fwd)

So, nobory seem to know, why the my virtual hosts don't work?
I noticed, that if I try to access one of the "other" VirtualHosts -
anyway it is being redirected to tomcat (even if it is a regular
index.html). Sure, tomcat does not process the request, and apache does
not answer.

Anybody experienced this kind of problem?


---------- Forwarded message ----------
Date: Tue, 22 Apr 2003 22:38:15 -0400 (EDT)
From: Dmitry Volodkovich <>
Reply-To: Tomcat Users List <>
Subject: mod_jk and apache virtual hosting

Hi All,

I've got apache 2.0.45 and mod_jk (not 2).

When apache is configured to serve the only 1 server - everything is all
right, it redirects me to the tomcat server and showes the jsp.

When I set up VirtualHosts, serving my 2 web sites (by name) and the 3rd
is - the tomcat rediretion - the only tomcat redirected host does work,
and the first 2 - whenever I request index.html - apache does not respond
at all. If I check that by telnet and say
	GET /index.html
the response is pure silience.

When I comment the mod_jk settings in httpd.conf - the mod_jk appeares to
be unconfigured and the java server (tomcat redirected) does not work.
But the other 2 virtual hosts do work.

My httpd.conf looks this (the part of it):

LoadModule jk_module modules/
LoadModule php4_module        modules/

NameVirtualHost *
<VirtualHost *>
  DocumentRoot /document1/root
  ErrorLog logs/error_mail_log
  CustomLog logs/access_mail_log common

<VirtualHost *>
  DocumentRoot "/document2/root"
  ErrorLog logs/error_name2_log
  CustomLog logs/access_name2_log common

JkWorkersFile "/some/path/"
JkLogFile "/some/path/logs/mod_jk.log"
JkLogLevel debug
JkMount /*.jsp testWorker
JkMount /manager ajp13
JkMount /manager/* ajp13

<... and so on ... >

Only if the second part is commented - the first VirtualHost does work.
If it is UNcommented - the only works, and the does
not respond, but the browser (telnet) can connect to the port 80.

Did anybod experience the problem? Please, help me.


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

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

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

View raw message