You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Kaps, Michael" <Mi...@bwf-group.de> on 2010/12/13 14:04:07 UTC
mod_jk is not working correctly
Hello together,
I've a problem with mod_jk (Apache2 + Tomcat 5.5).
Unfortunately if I try to request jsp-Files via Port 80 (Apache2) I only ge=
t the source code back.
But if I try to request the same files on port 8180 through Tomcat, the pag=
e is correctly displayed.
Here is the config I made:
/etc/apache2/workers.properties
workers.tomcat_home=3D/etc/tomcat5.5
workers.java_home=3D/usr/lib/jvm/java-6-sun
ps=3D/
worker.list=3Dworker1
worker.default.port=3D8009
worker.default.host=3Dlocalhost
worker.default.type=3Dajp13
worker.default.lbfactor=3D1
/etc/apache2/mods-enabled/jk.conf
# Where to find workers.properties
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send servlet for context / jsp-examples to worker named worker1
JkMount /jsp-examples worker1
# Send JSPs for context /jsp-examples/* to worker named worker1
JkMount /jsp-examples/* worker1
I copied the folder jsp-examples in my /var/www folder and now I tried to e=
xecute these scripts, but without success.
I don't know what to do further.
Michael
Re: mod_jk is not working correctly
Posted by Rainer Jung <ra...@kippdata.de>.
Don't ignore the rest of the recommendation! At least not for a long time.
Rainer
On 13.12.2010 15:06, Kaps, Michael wrote:
> Thank you very much, that was it!
>
> Best regards
>
> Michael
>
> -----Ursprüngliche Nachricht-----
> Von: Rainer Jung [mailto:rainer.jung@kippdata.de]
> Gesendet: Montag, 13. Dezember 2010 14:45
> An: Tomcat Users List
> Betreff: Re: mod_jk is not working correctly
>
> On 13.12.2010 14:04, Kaps, Michael wrote:
>> Hello together,
>>
>> I've a problem with mod_jk (Apache2 + Tomcat 5.5).
>>
>> Unfortunately if I try to request jsp-Files via Port 80 (Apache2) I only ge=
>> t the source code back.
>>
>> But if I try to request the same files on port 8180 through Tomcat, the pag=
>> e is correctly displayed.
>>
>> Here is the config I made:
>>
>> /etc/apache2/workers.properties
>> workers.tomcat_home=3D/etc/tomcat5.5
>> workers.java_home=3D/usr/lib/jvm/java-6-sun
>> ps=3D/
>> worker.list=3Dworker1
>> worker.default.port=3D8009
>> worker.default.host=3Dlocalhost
>> worker.default.type=3Dajp13
>> worker.default.lbfactor=3D1
>>
>> /etc/apache2/mods-enabled/jk.conf
>> # Where to find workers.properties
>> JkWorkersFile /etc/apache2/workers.properties
>>
>> # Where to put jk logs
>> JkLogFile /var/log/apache2/mod_jk.log
>>
>> # Set the jk log level [debug/error/info]
>> JkLogLevel info
>>
>> # Select the log format
>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>>
>> # JkOptions indicate to send SSL KEY SIZE,
>> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>>
>> # JkRequestLogFormat set the request format
>> JkRequestLogFormat "%w %V %T"
>>
>>
>> # Send servlet for context / jsp-examples to worker named worker1
>> JkMount /jsp-examples worker1
>> # Send JSPs for context /jsp-examples/* to worker named worker1
>> JkMount /jsp-examples/* worker1
>>
>> I copied the folder jsp-examples in my /var/www folder and now I tried to e=
>> xecute these scripts, but without success.
>>
>> I don't know what to do further.
>
> Have a look at the JkMountCopy description at
>
> http://tomcat.eu.apache.org/connectors-doc/reference/apache.html
>
> It could be your problem.
>
> I'd start with using the latest version 1.2.31 and also retrieve the
> source tarball of that version. It contains a complete and nicely
> commented example configuration.
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
kippdata
informationstechnologie GmbH Tel: 0228 98549 -0
Bornheimer Str. 33a Fax: 0228 98549 -50
53111 Bonn www.kippdata.de
HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417
Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann
===============================
kippdata
informationstechnologie GmbH Tel: +49 228 98549 -0
Bornheimer Str. 33a Fax: +49 228 98549 -50
D-53111 Bonn www.kippdata.de
HRB 8018 Amtsgericht Bonn / USt.-IdNr. DE 196 457 417
Geschäftsführer: Dr. Thomas Höfer, Rainer Jung, Sven Maurmann
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: mod_jk is not working correctly
Posted by "Kaps, Michael" <Mi...@bwf-group.de>.
Thank you very much, that was it!
Best regards
Michael
-----Ursprüngliche Nachricht-----
Von: Rainer Jung [mailto:rainer.jung@kippdata.de]
Gesendet: Montag, 13. Dezember 2010 14:45
An: Tomcat Users List
Betreff: Re: mod_jk is not working correctly
On 13.12.2010 14:04, Kaps, Michael wrote:
> Hello together,
>
> I've a problem with mod_jk (Apache2 + Tomcat 5.5).
>
> Unfortunately if I try to request jsp-Files via Port 80 (Apache2) I only ge=
> t the source code back.
>
> But if I try to request the same files on port 8180 through Tomcat, the pag=
> e is correctly displayed.
>
> Here is the config I made:
>
> /etc/apache2/workers.properties
> workers.tomcat_home=3D/etc/tomcat5.5
> workers.java_home=3D/usr/lib/jvm/java-6-sun
> ps=3D/
> worker.list=3Dworker1
> worker.default.port=3D8009
> worker.default.host=3Dlocalhost
> worker.default.type=3Dajp13
> worker.default.lbfactor=3D1
>
> /etc/apache2/mods-enabled/jk.conf
> # Where to find workers.properties
> JkWorkersFile /etc/apache2/workers.properties
>
> # Where to put jk logs
> JkLogFile /var/log/apache2/mod_jk.log
>
> # Set the jk log level [debug/error/info]
> JkLogLevel info
>
> # Select the log format
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>
> # JkOptions indicate to send SSL KEY SIZE,
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>
> # JkRequestLogFormat set the request format
> JkRequestLogFormat "%w %V %T"
>
>
> # Send servlet for context / jsp-examples to worker named worker1
> JkMount /jsp-examples worker1
> # Send JSPs for context /jsp-examples/* to worker named worker1
> JkMount /jsp-examples/* worker1
>
> I copied the folder jsp-examples in my /var/www folder and now I tried to e=
> xecute these scripts, but without success.
>
> I don't know what to do further.
Have a look at the JkMountCopy description at
http://tomcat.eu.apache.org/connectors-doc/reference/apache.html
It could be your problem.
I'd start with using the latest version 1.2.31 and also retrieve the
source tarball of that version. It contains a complete and nicely
commented example configuration.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: mod_jk is not working correctly
Posted by Rainer Jung <ra...@kippdata.de>.
On 13.12.2010 14:04, Kaps, Michael wrote:
> Hello together,
>
> I've a problem with mod_jk (Apache2 + Tomcat 5.5).
>
> Unfortunately if I try to request jsp-Files via Port 80 (Apache2) I only ge=
> t the source code back.
>
> But if I try to request the same files on port 8180 through Tomcat, the pag=
> e is correctly displayed.
>
> Here is the config I made:
>
> /etc/apache2/workers.properties
> workers.tomcat_home=3D/etc/tomcat5.5
> workers.java_home=3D/usr/lib/jvm/java-6-sun
> ps=3D/
> worker.list=3Dworker1
> worker.default.port=3D8009
> worker.default.host=3Dlocalhost
> worker.default.type=3Dajp13
> worker.default.lbfactor=3D1
>
> /etc/apache2/mods-enabled/jk.conf
> # Where to find workers.properties
> JkWorkersFile /etc/apache2/workers.properties
>
> # Where to put jk logs
> JkLogFile /var/log/apache2/mod_jk.log
>
> # Set the jk log level [debug/error/info]
> JkLogLevel info
>
> # Select the log format
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>
> # JkOptions indicate to send SSL KEY SIZE,
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>
> # JkRequestLogFormat set the request format
> JkRequestLogFormat "%w %V %T"
>
>
> # Send servlet for context / jsp-examples to worker named worker1
> JkMount /jsp-examples worker1
> # Send JSPs for context /jsp-examples/* to worker named worker1
> JkMount /jsp-examples/* worker1
>
> I copied the folder jsp-examples in my /var/www folder and now I tried to e=
> xecute these scripts, but without success.
>
> I don't know what to do further.
Have a look at the JkMountCopy description at
http://tomcat.eu.apache.org/connectors-doc/reference/apache.html
It could be your problem.
I'd start with using the latest version 1.2.31 and also retrieve the
source tarball of that version. It contains a complete and nicely
commented example configuration.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: mod_jk is not working correctly
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael,
On 12/13/2010 8:04 AM, Kaps, Michael wrote:
> Unfortunately if I try to request jsp-Files via Port 80 (Apache2) I
> only get the source code back.
You have probably set Apache DocumentRoot = webapp docBase (or a similar
Alias), which is a dangerous thing to do. If you change your JkMount to
include only *.jsp, you'll suddenly open your configuration up to
requests like this:
http://host/jsp-examples/WEB-INF/web.xml
Oops.
If you are mapping /jsp-examples/* to Tomcat, there's no need to also
use an Alias or DocumentRoot that points to the same place.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0Gh04ACgkQ9CaO5/Lv0PDGIgCgrtEaO+DruMxuU6KlH15jpMe+
vx4An2WbFz2CSxqlujMgSa4vySIrD3RA
=s0Rg
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org