tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Wagner" <ewag...@Handspring.com>
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
file:

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

<IfDefine HAVE_JK>
    JkWorkersFile conf/workers.properties
</IfDefine>

<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
    </IfDefine>
</VirtualHost>

-----Original Message-----
From: Dmitry Volodkovich [mailto:dmitryv@primus.ca]
Sent: Wednesday, April 23, 2003 6:11 PM
To: tomcat-user@jakarta.apache.org
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?

Dmitry.

---------- Forwarded message ----------
Date: Tue, 22 Apr 2003 22:38:15 -0400 (EDT)
From: Dmitry Volodkovich <dmitryv@primus.ca>
Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
To: tomcat-user@jakarta.apache.org
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/mod_jk-2.0.43.so
LoadModule php4_module        modules/libphp4.so

NameVirtualHost *
<VirtualHost *>
  ServerAdmin root@name1.com
  ServerName mail.name1.com
  DocumentRoot /document1/root
  ErrorLog logs/error_mail_log
  CustomLog logs/access_mail_log common
</VirtualHost>

<VirtualHost *>
  ServerAdmin root@name1.com
  ServerName www.name2.com
  DocumentRoot "/document2/root"
  ErrorLog logs/error_name2_log
  CustomLog logs/access_name2_log common
</VirtualHost>

#-----------------------------------------------------
JkWorkersFile "/some/path/workers.properties"
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 name2.com works, and the name1.com does
not respond, but the browser (telnet) can connect to the port 80.

Did anybod experience the problem? Please, help me.

Regards,
Dmitry.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message