Connecting openBD via Tomcat to Apache2

2010-05-24 Thread Christian Adelbrecht
Hi there!

I am very new to tomcat and I have a little problem
serving pages...

After the installation of tomcat, mod_jk and openbd
everything was fine. The manager worked and so on.

Now I tried to connect a Domains via the vhost setting
in apache2 to tomcat.

When I go to the domain www.testdomain.org I can
see the directoryindex of /var/www/www.testdomain.org/
but when I click on a file (doesn't matter if .jsp, .cfm or
.html) I come to a 404 tomcat page... I have the logs
down to debug but I cannot see in what directory the
tomcat is searching for the files...

And: clicking on a .css file brings the content throu
apache2... but .html is not! (as i have only the .cfm,
.jsp and that stuff given to tomcat

part of my apache2.conf (debian)

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

I really need help!

Thanks a lot

Regards
Christian


Re: Connecting openBD via Tomcat to Apache2

2010-05-24 Thread Christian Adelbrecht
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


 ?


 p





Re: Connecting openBD via Tomcat to Apache2

2010-05-24 Thread Christian Adelbrecht
2010/5/24 Pid p...@pidster.com

 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.


Apache 2.2.3 etch11 is the latest etch version
as this tomcat was the version that came with the openbd-installer I want
to try it with this one. (support for Dummies)



 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.


In some newsgroups I read, that tomcat is slower than apache, so thats
why I wanted them both. Btw I am using a servermanager-tool, that cannot
handle tomcat virtual hosts...




 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

  and 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


my new server.xml

 Host name=www.testdomain.org
 appBase=webapps
unpackWARs=true
autoDeploy=true
xmlValidation=false
 xmlNamespaceAware=false
/Host

and my new context.xml.default in the tomcat conf hostname folder:

Context 
path=/var/www/www.testdomain.org/webapps/http://www.testdomain.org/htdocs/
ROOT/
docBase=/var/www/www.testdomain.org/htdocs/
 allowLinking=true
 reloadable=true /

Better?




 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.


 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.

 as done above?!


 p



Thanks a lot for your support!

Regards
Christian

-
I search the web using www.ecosia.org