Kyle wrote:
I have Apache serving multiple VHosts. I want to (eventually)
integrate different versions of Tomcat into different VHosts, but for
now, I'd settle for just 5.5.9 working with my default Apache VHost.
Apache works dandy alone on :80.
Tomcat works just fine on :8080.
I have the jsp-examples and servlets-examples pages displaying from
host.domain.com/......
But I have not yet managed to get
www.host.domain.com/<prefix>-examples/<this_or_that_example> to work
without returning a 500 Error.
First is it apache or tomcat that is returning the 500 ?
This might be easiest found setting up logging of your specific VHost in
apache to a different file than the default apache logs (that are in
apache/logs/....). Then breaking the ServerName and ServerAlias
configuration in apache (restarting apache inbetween) and checking to
see that the request you put through with say "wget" is being directed
by apache to the correct Apache VHost logfile.
I would revise your JkMount to look like:
JkMount /admin/* ajp13Wkr
This will pass-thru apache everything for the webapp to TC.
I would also remove "inprocess" from the "worker.list" settings.
Once you have that established you can then work on your JkMount
settings and Tomcat. Have you checked out, understood and implement the
information in
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Host+Name+Aliases
?
I suspect your only remaining problem now is to get Apache and Tomcat to
see the same website document roots for the same URLs. This maybe a
problem if you are using deployed WARs since tomcat can and will delete
the directory from under apache during the deployment process.
Likewise, I am unable to get the host.domain.com/admin,
host.domain.com/manager/html or host.domain.com/manager/status to
display over :80
Various errors I am seeing are;
"File does not exist /opt/www/root/jsp-examples/<this_or_that_example>"
"File does not exist /opt/www/root/admin"
or
/admin just displays the index.
Files look like this;
================
httpd.conf
==========
ServerName host.domain.com:80
UseCanonicalName Off
DocumentRoot /opt/www/root
..........
..........
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
ServerName host.domain.com
ErrorLog logs/host-defaulthost-error_log
CustomLog logs/host-defaulthost-access_log common
Include /opt/jakarta-tomcat-5.5.9/conf/auto/mod_jk.conf-hostname
</VirtualHost>
----------------------------------------------------------------------
server.xml
==========
.............
<Connector port="8009" enableLookups="false" protocol="AJP/1.3"/>
<Engine name="Catalina" defaultHost="host.domain.com">
<Host name="host.domain.com" appBase="webapps" unpackWARs="true"
autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>localhost</Alias>
</Host>
<Listener className="org.apache.jk.config.ApacheConfig"
modJk="/opt/httpd/modules/mod_jk.so"
workersConfig="/opt/jakarta-tomcat-5.5.9/conf/workers.properties"
forwardAll="false"
jkLog="/var/log/httpd/mod_jk.log" jkDebug="info"
jkWorker="ajp13Wkr"/>
</Engine>
</Service>
</Server>
----------------------------------------------------------------------------------
workers.properties
==================
workers.tomcat_home=/opt/jakarta-tomcat-5.5.9
#workers.tomcat_home=/opt/tomcat
workers.java_home=/opt/java
ps=/
# The workers that your plugins should create and work with
#
worker.list=ajp13Wkr, inprocess
worker.ajp13Wkr.port=8009
worker.ajp13Wkr.host=host.domain.com
worker.ajp13Wkr.type=ajp13
worker.ajp13Wkr.lbfactor=1
worker.ajp13Wkr.cachesize=30
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13Wkr
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)client$(ps)libjvm.so
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)
---------------------------------------------------------------------
and the included file in the httpd.conf VHost above
mod-jk.conf-hostname
================
JkWorkersFile "/opt/jakarta-tomcat-5.5.9/conf/workers.properties"
JkLogFile "/var/log/httpd/mod_jk.log"
JkLogLevel debug
JkLogStampFormat "[%a %d %b %Y %H:%M:%S] "
JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
JkRequestLogFormat "%w %V %T"
# Static files
Alias /admin "/opt/jakarta-tomcat-5.5.9/server/webapps/admin"
<Directory "/opt/jakarta-tomcat-5.5.9/server/webapps/admin">
Options Indexes FollowSymLinks
DirectoryIndex index.jsp index.html index.htm
Order allow,deny
Allow from All
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/admin/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/admin/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /admin/j_security_check ajp13Wkr
JkMount /admin/index.jsp ajp13Wkr
JkMount /admin/host/hosts.jsp ajp13Wkr
JkMount /admin/saved.jsp ajp13Wkr
JkMount /admin/server/server.jsp ajp13Wkr
JkMount /admin/resources/dataSource.jsp ajp13Wkr
......................................................
###################################################
# with lots more mappings as generated by tomcat. #
###################################################
# Static files
Alias /jsp-examples "/opt/jakarta-tomcat-5.5.9/webapps/jsp-examples"
<Directory "/opt/jakarta-tomcat-5.5.9/webapps/jsp-examples">
Options Indexes FollowSymLinks
DirectoryIndex index.jsp index.html index.htm
Order allow,deny
Allow from all
</Directory>
# Deny direct access to WEB-INF and META-INF
#
<Location "/jsp-examples/WEB-INF/*">
AllowOverride None
deny from all
</Location>
<Location "/jsp-examples/META-INF/*">
AllowOverride None
deny from all
</Location>
JkMount /jsp-examples/security/protected/j_security_check ajp13Wkr
JkMount /jsp-examples/*.jsp ajp13Wkr
JkMount /jsp-examples/forward/one.jsp ajp13Wkr
JkMount /jsp-examples/tagplugin/foreach.jsp ajp13Wkr
JkMount /jsp-examples/dates/date.jsp ajp13Wkr
JkMount /jsp-examples/jsp2/tagfiles/panel.jsp ajp13Wkr
....................................
-----------------------------------------------------------
WHAT am I doing wrong please?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Darryl L. Miles
M: 07968 320 114
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]