You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Maceda Marcos <mm...@servexternos.gruposantander.com> on 2004/03/02 11:49:24 UTC

[users@httpd] mod_include do NOT use the correct JK2 worker

Hello,

I am testing Apache-Tomcat in Windows 2000 Server for my purposes but
finally this will work in production over a Intel-Linux machine
undetermined by now.

I have connected Apache 2.0.43 and Tomcat 4.1.12 via jk2 using the binary
versions for the Windows NT plattform:

- jakarta-tomcat-connectors-jk2.0.2-win32-apache2.0.43.zip
- apache_2.0.43-win32-x86-no_ssl.msi
- jakarta-tomcat-4.1.12.zip

I have configured two JK2 workers that resolve to two different tomcat
webapp in two different tomcat services. 
I show you my config files below.
 
My Apache virtual hosts are in ports 80 and 90 and have configured
mod_include and the option +IncludesNOEXEC.

Now my problem. 

If I query a Tomcat mounted URI in the port 80 i get the correct answer
from the tomcat listening the worker 'worker1'  
If I query a Tomcat mounted URI in the port 90 i get the correct answer
from the tomcat listening the worker 'worker2'

For example (correct answers):
 - //localhost/app/test/test.jsp  
 - //localhost:90/app/test/test.jsp
 
But, if I query with a SSI:
  - <!--#include virtual="/app/test/test.jsp" -->

The answer is always get from the worker defined in workers2.properties
with 8009 port no matter wich virtual host is supposed to resolve it.

Do you have any idea? Could be a bug? in mod_include? in JK2? in Apache2?
Do you think that this will be corrected if i 'degrade' to JK1 conectors?

I have search in all the bug databases and change_logs i found and dont
think it is fixed.

Thanks for your time.
Marcos

My config files are:

workers2.properties (full)
--------------------------

[shm]
file=c:/temp/shm.file
size=1000000

[channel.socket:localhost:8010]
[channel.socket:localhost:8009]

[ajp13:localhost:8009]
channel=channel.socket:localhost:8009

[ajp13:localhost:8010]
channel=channel.socket:localhost:8010

[uri:localhost:90/app/*]
worker=ajp13:localhost:8010

[uri:localhost:80/app/*]
worker=ajp13:localhost:8009

httpd.conf (only where i think is relevant)
-------------------------------------------
...
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
LoadModule include_module modules/mod_include.so
...
#ServerName localhost:80
...
AddType text/html .shtml
...
AddOutputFilter INCLUDES .jsp
AddOutputFilter INCLUDES .shtml
...
Listen 80
Listen 90

NameVirtualHost *:80
NameVirtualHost *:90

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot C:/opt/www/live
    Options Indexes FollowSymLinks +IncludesNOEXEC
    <Directory "/">
     Options Indexes FollowSymLinks +IncludesNOEXEC MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
 </Directory>
</VirtualHost>

<VirtualHost *:90>
    ServerName localhost
    DocumentRoot C:/opt/www/dev
    Options Indexes FollowSymLinks +IncludesNOEXEC
    <Directory "/">
     Options Indexes FollowSymLinks +IncludesNOEXEC MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
 </Directory>
</VirtualHost>

Tomcat server.xml (oly relevant) 
--------------------------------

I think this is not related with the problem. 

<?xml version='1.0' encoding='utf-8'?>

<Server className="org.apache.catalina.core.StandardServer" debug="0"
port="8005" shutdown="SHUTDOWN">

  <Service className="org.apache.catalina.core.StandardService" debug="0"
name="Tomcat-live">
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="10" bufferSize="2048" connectionTimeout="20000" debug="0"
enableLookups="true" maxProcessors="75" minProcessors="5" port="8009"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
tcpNoDelay="true" useURIValidationHack="false">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
    </Connector>
    <Engine className="org.apache.catalina.core.StandardEngine" debug="0"
defaultHost="localhost"
mapperClass="org.apache.catalina.core.StandardEngineMapper"
name="tomcat-live">
      <Host className="org.apache.catalina.core.StandardHost"
appBase="webapps" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="0"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="localhost" unpackWARs="true">
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" docBase="C:\opt\as\live"
mapperClass="org.apache.catalina.core.StandardContextMapper" path="/app"
privileged="false" reloadable="true" swallowOutput="true"
useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper">
        </Context>
      </Host>
    </Engine>
  </Service>
  
  <Service className="org.apache.catalina.core.StandardService" debug="0"
name="Tomcat-dev">
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="10" bufferSize="2048" connectionTimeout="20000" debug="0"
enableLookups="true" maxProcessors="75" minProcessors="5" port="8010"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
tcpNoDelay="true" useURIValidationHack="false">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
    </Connector>
    <Engine className="org.apache.catalina.core.StandardEngine" debug="0"
defaultHost="localhost"
mapperClass="org.apache.catalina.core.StandardEngineMapper"
name="tomcat-dev">
      <Host className="org.apache.catalina.core.StandardHost"
appBase="webapps-b" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="0"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="localhost" unpackWARs="true">
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" docBase="C:\opt\as\dev"
mapperClass="org.apache.catalina.core.StandardContextMapper" path="/app"
privileged="false" reloadable="true" swallowOutput="true"
useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper">
        </Context>
      </Host>
    </Engine>
  </Service>
  
</Server>


******************AVISO LEGAL******************

Este mensaje es privado y confidencial y solamente para la persona a la
que va dirigido. Si usted ha recibido este mensaje por error, no debe
revelar, copiar, distribuir o usarlo en ningun sentido. Le rogamos lo
comunique al remitente y borre dicho mensaje y cualquier documento
adjunto que pudiera contener. No hay renuncia a la confidencialidad ni a
ningun privilegio por causa de transmision erronea o mal funcionamiento.
Cualquier opinion expresada en este mensaje pertenece unicamente al autor
remitente, y no representa necesariamente la opinion de Santander Central
Hispano, a no ser que expresamente se diga y el remitente este autorizado
para hacerlo.
Los correos electronicos no son seguros, no garantizan la
confidencialidad ni la correcta recepcion de los mismos, dado que pueden
ser interceptados, manipulados, destruidos, llegar con demora,
incompletos, o con virus. Santander Central Hispano no se hace
responsable de las alteraciones que pudieran hacerse al mensaje una vez
enviado.
Este mensaje solo tiene una finalidad de informacion, y no debe
interpretarse como una oferta de venta o de compra de valores ni de
instrumentos financieros relacionados. En el caso de que el destinatario
de este mensaje no consintiera la utilizacion del correo electronico via
Internet, rogamos lo ponga en nuestro conocimiento.

******************DISCLAIMER******************
This message is private and confidential and it is intended exclusively
for the addressee. If you receive this message by mistake, you should not
disseminate, distribute or copy this e-mail. Please inform the sender and
delete the message and attachments from your system. No confidentiality
nor any privilege regarding the information is waived or lost by any
mistransmission or malfunction.
Any views or opinions contained in this message are solely those of the
author, and do not necessarily represent those of Santander Central
Hispano, unless otherwise specifically stated and the sender is
authorised to do so.
E-mail transmission cannot be guaranteed to be secure, confidential, or
error-free, as information could be intercepted, corrupted, lost,
destroyed, arrive late, incomplete, or contain viruses. Santander Central
Hispano does not accept responsibility for any changes in the contents of
this message after it has been sent.
This message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments. If the addressee of this message does not
consent to the use of internet e-mail, please communicate it to us.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org