On 24/05/2010 16:53, Christian Adelbrecht wrote:
> hi!
> 
>     What are the exact OS
> 
> Linux 2.6.18-6-k7
> 
>     , JVM,
> 
> 1.6.0_16-b01
>  
>     Tomcat,
> 
> Apache Tomcat/6.0.20 
>  
>     HTTPD
> 
> Apache 2.2.3
> 
>     and mod_jk versions
> 
> mod_jk 1.2.27

Note: there are more recent versions of all of these.  You should
particularly consider upgrading Tomcat and HTTPD.


I will assume for now, that you have a sound reason for deploying HTTPD
and Tomcat at the same time, rather than just letting Tomcat do all the
work.  If you'd like to know more, ask.



<IfModule !mod_jk.c>
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
</IfModule>

<IfModule mod_jk.c>
JkMount /*.cfm ajp13
JkMount /*.cfc ajp13
JkMount /*.do ajp13
JkMount /*.jsp ajp13
JkMount /*.cfchart ajp13
JkMount /*.cfres ajp13
JkMount /*.cfm/* ajp13
JkMount /*.cfml/* ajp13
JkMountCopy all
JkLogLevel info
JkLogFile /var/log/apache2/mod_jk/mod_jk.log
</IfModule>

an my server.xml

  <Host name="www.testdomain.org"
 appBase="webapps"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">
<Context path=""
docBase="/var/www/www.testdomain.org/htdocs/"
allowLinking="true"
debug="9"
 reloadable="true" />
</Host>


The above is very bad practice and likely to lead to you exposing data
that you shouldn't.  JSPs and other content should not be mixed in the
same directory.  Context should not be defined in server.xml.  The debug
attribute isn't used anymore.

Read the following:

 http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html

and:

 http://tomcat.apache.org/tomcat-6.0-doc/config/context.html



If you have to use both HTTPD and Tomcat, construct a directory
structure like this:

All static content should go here:
 /var/www/www.testdomain.org/htdocs/

All java webapps should go here:
 /var/www/www.testdomain.org/webapps/

Servlet Spec webapps and other java applications are deployed, one each,
in a directory inside the above.  e.g.

 /var/www/www.testdomain.org/webapps/ROOT
 /var/www/www.testdomain.org/webapps/myapp
 /var/www/www.testdomain.org/webapps/another_app

ROOT is the special name for the default application, which is what you
were attempting to do with the path="" attribute.


p











Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to