You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Robert Zöhrer @ pronet.at" <ro...@pronet.at> on 2003/08/15 16:49:28 UTC
Tomcat MultiHosting problems
Hi all,
I've great problems with Tomcat and setting up a context in a 2nd
(virtual) host:
my environmemt:
OS: Redhat Linux
Platform: Intel x86
TC version: 4.1
tomcat4.conf:
--- cut -----
CATALINA_HOME="/var/tomcat4"
JASPER_HOME="/var/tomcat4"
CATALINA_TMPDIR="/var/tomcat4/temp"
---- cut -----
1) There is a dir called /home/www/vhostxx/html/webapps for the
vhost-files. There User uploaded her Apps via FTP. There are just a
few jsp-files and a WEB-INF-subdir with a standard web.xml.
Permissions:
drwxrwxrwx 2 vhostxx_user ftponly 4096 Aug 12 14:03 webapps
2) Host and Context are defined in server.xml (see below)
But when i define the Context (shown below) with den Admin Panel, I
get this error from the Logger:
2003-08-15 14:27:21 StandardContext[/webapps]: Resources start failed:
java.lang.IllegalArgumentException: Document base
/home/www/vhostxx/html/webapps does not exist or is not a
readable directory
and
2003-08-15 14:27:21 StandardContext[/webapps]: Context startup failed
due to previous errors
2003-08-15 14:27:21 StandardContext[/webapps]: Exception during
cleanup after start failed
:(
3) When I try http://www.www.domain_vhostxx.at:8080/webapps/file.jsp
I also get
HTTP Status 404 - /webapps/file.jsp
type Status report
message /webapps/file.jsp
description The requested resource (/webapps/file.jsp) is not available.
Of course, this is, because "Context startup failed" .. but why is
this so? TC has also add a work-dir for this host and context but the
context-working-dir is empty :(
There are no basicly problems, because the Admin Panel (localhost,
context: /admin) works fine.
Is it a problem, when appBase, docBase are outside $CATALINA_HOME?
Are there spezial permission needs for the appBase, docBase dirs? But
now there are permissions to ALL with
drwxrwxrwx 2 vhostxx_user ftponly 4096 Aug 12 14:03 webapps
Is there anything that I don't know?
I'ld be very very glad if anybody has an idea, because I've studied
the docs for days and can't see a mistake in my config?
Thanks a lot Robert
>From server.xml:
############# Standard Localhost with Admin & Manager Context #######
<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" displayName="Tomcat
Administration Application" docBase="../server/webapps/admin"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/admin" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Logger className="org.apache.catalina.logger.FileLogger"
debug="0" directory="logs" prefix="localhost_admin_log." suffix=".txt"
timestamp="true" verbosity="1"/>
</Context>
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" displayName="Tomcat
Manager Application" docBase="../server/webapps/manager"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/manager" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<ResourceLink global="UserDatabase" name="users"
type="org.apache.catalina.UserDatabase"/>
</Context>
</Host>
############# my new Host ###########################
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/vhostxx/html/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="www.domain_vhostxx.at" unpackWARs="true">
<Alias>domain_vhostxx.at</Alias>
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="true" debug="0"
docBase="/home/www/vhostxx/html/webapps"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/webapps" privileged="false" reloadable="true"
swallowOutput="true" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
</Host>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
Hi,
Now we 've deleted the complete Work-Dir (/var/cache/tomcat4/work)
and restartet TC .. and nothing do work :(
Even the Adim-Panel doesn't work any longer :(
The error is allways like this
http://pronet.at:8080/tomcat/test.jsp
Was it wrong to delete the whole Work-Dir? Why doesn't TC create a new
one?
Thanks
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
Hi,
Now we 've deleted the complete Work-Dir (/var/cache/tomcat4/work)
and restartet TC .. and nothing do work :(
Even the Adim-Panel doesn't work any longer :(
The error is allways like this
http://pronet.at:8080/tomcat/test.jsp
Was it wrong to delete the whole Work-Dir? Why doesn't TC create a new
one?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by John Turner <to...@johnturner.com>.
Yeah, it was wrong. You want to recreate it, and instead delete
everything IN it when doing a restart.
So something like:
rm -rf /var/cache/tomcat4/work/Standalone/*
NOT
rm -rf /var/cache/tomcat4/work
John
Robert Zöhrer @ pronet.at wrote:
> Hi,
>
> Now we 've deleted the complete Work-Dir (/var/cache/tomcat4/work)
>
> and restartet TC .. and nothing do work :(
>
> Even the Admin-Panel doesn't work any longer :(
>
> The error is allways like this
>
> http://pronet.at:8080/tomcat/test.jsp
>
> Was it wrong to delete the whole Work-Dir? Why doesn't TC create a new
> one?
>
> Thanks
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by John Turner <to...@johnturner.com>.
Yeah, it was wrong. You want to recreate it, and instead delete
everything IN it when doing a restart.
So something like:
rm -rf /var/cache/tomcat4/work/Standalone/*
NOT
rm -rf /var/cache/tomcat4/work
John
Robert Zöhrer @ pronet.at wrote:
> Hi,
>
> Now we 've deleted the complete Work-Dir (/var/cache/tomcat4/work)
>
> and restartet TC .. and nothing do work :(
>
> Even the Admin-Panel doesn't work any longer :(
>
> The error is allways like this
>
> http://pronet.at:8080/tomcat/test.jsp
>
> Was it wrong to delete the whole Work-Dir? Why doesn't TC create a new
> one?
>
> Thanks
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
Hi,
Now we 've deleted the complete Work-Dir (/var/cache/tomcat4/work)
and restartet TC .. and nothing do work :(
Even the Admin-Panel doesn't work any longer :(
The error is allways like this
http://pronet.at:8080/tomcat/test.jsp
Was it wrong to delete the whole Work-Dir? Why doesn't TC create a new
one?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
Hi,
Now we 've deleted the complete Work-Dir (/var/cache/tomcat4/work)
and restartet TC .. and nothing do work :(
Even the Admin-Panel doesn't work any longer :(
The error is allways like this
http://pronet.at:8080/tomcat/test.jsp
Was it wrong to delete the whole Work-Dir? Why doesn't TC create a new
one?
Thanks
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
Am 8/18/2003 7:48 PM meinte John Turner folgendes:
> Have you used separate appBases for each host?
yes .. separate appBases, docBases .. but the same settings, the same
TC instance
>
> What are the error messages?
at website and logfile the same message:
HTTP Status 500
javax.servlet.ServletException: org/apache/jasper/runtime/HttpJspBase
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/HttpJspBase
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
at org.apache.jasper.JspCompilationContext.load(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(Unknown Source)
at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
at org.apache.jasper.JspCompilationContext.compile(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
Am 8/18/2003 7:48 PM meinte John Turner folgendes:
> Have you used separate appBases for each host?
yes .. separate appBases, docBases .. but the same settings, the same
TC instance
>
> What are the error messages?
at website and logfile the same message:
HTTP Status 500
javax.servlet.ServletException: org/apache/jasper/runtime/HttpJspBase
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/HttpJspBase
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
at org.apache.jasper.servlet.JasperLoader.loadClass(Unknown Source)
at org.apache.jasper.JspCompilationContext.load(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(Unknown Source)
at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
at org.apache.jasper.compiler.Compiler.isOutDated(Unknown Source)
at org.apache.jasper.JspCompilationContext.compile(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Re: Tomcat MultiHosting problems
Posted by John Turner <to...@johnturner.com>.
Have you used separate appBases for each host?
What are the error messages?
What are the log contents when the URL does not work?
John
Robert Zöhrer @ pronet.at wrote:
> 8/18/2003 2:25 PM John Turner:
>
>>appBase != docBase
>>
>>Right now your Context is using the same value for its docBase as your
>>Host is using for its appBase. Your docBase cannot be your appBase, not
>>to mention that your Context is using a path of "/webapps" which could
>>cause all sorts of weird problems.
>>
>>Set appBase = /home/www/vhostxx/html/webapps but then set docBase =
>>"myApp" or something like that (it is automatically relative to the
>>appBase).
>
>
> Thanks 4 answer John
>
> We don't use appBase = docBasethe and the term "webapps" as path- or
> dir-name any longer .. but another mistake was definititly the
> ownership of the appBase-dir .. the user "tomcat4" was not in the same
> group as the owner of appBase.
>
> drwxr-xr-x 3 web10 ftponly 4096 Aug 18 15:08 appbase_dir
>
> Now the user "tomcat" is in ftponly group too .. and "he" got the dir now.
>
> But now I've some very hard troubles with a test.jsp file, which works
> in one host, but in 3 others (with exactly the same seetings) it
> doesn't :( .. and I've no idea, why :(
>
> test.jsp:
> ################
> <% for (int i=0; i < 10; i++) { %>
> zeile <%= i %> <br>
> <% } %>
> ################
>
> At http://webteam.at:8080/tomcat/test.jsp it works
>
> docBase:
>
> drwxr-xr-x 2 web156 ftponly 4096 Aug 18 16:09 tomcat
>
> and the file:
>
> -rwxrwxrwx 1 web156 ftponly 64 Aug 16 18:32 test.jsp
>
> but at
>
> http://pronet.at:8080/tomcat/test.jsp I get an error, as seen in the
> browser
>
> docBase in this case .. same permissions:
>
> drwxr-xr-x 2 web10 ftponly 4096 Aug 18 18:37 tomcat
>
> File:
>
> -rwxrwxrwx 1 web10 ftponly 64 Aug 18 16:01 test.jsp
>
> There is another host I've tried with different directory names .. but
> allways the same error:
>
> AppBase: /home/www/web200/html/servlet
>
> docBase: myapp
>
> http://eko-immobilien.at:8080/myapp/test.jsp
>
> I can't see any differences between all these hosts and context
> settings .. but the jsp only works with
> http://webteam.at:8080/tomcat/test.jsp.
>
> Another "crazy" thing: At the admin panel I can see further hosts and
> contexts, which are NOT in the actual server.xml .. and if I want to
> delete them, I get an error.
>
> I'm very despairing .. so if anybody could help me ..
>
> Many, many Thanks
> Robert
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by John Turner <to...@johnturner.com>.
Have you used separate appBases for each host?
What are the error messages?
What are the log contents when the URL does not work?
John
Robert Zöhrer @ pronet.at wrote:
> 8/18/2003 2:25 PM John Turner:
>
>>appBase != docBase
>>
>>Right now your Context is using the same value for its docBase as your
>>Host is using for its appBase. Your docBase cannot be your appBase, not
>>to mention that your Context is using a path of "/webapps" which could
>>cause all sorts of weird problems.
>>
>>Set appBase = /home/www/vhostxx/html/webapps but then set docBase =
>>"myApp" or something like that (it is automatically relative to the
>>appBase).
>
>
> Thanks 4 answer John
>
> We don't use appBase = docBasethe and the term "webapps" as path- or
> dir-name any longer .. but another mistake was definititly the
> ownership of the appBase-dir .. the user "tomcat4" was not in the same
> group as the owner of appBase.
>
> drwxr-xr-x 3 web10 ftponly 4096 Aug 18 15:08 appbase_dir
>
> Now the user "tomcat" is in ftponly group too .. and "he" got the dir now.
>
> But now I've some very hard troubles with a test.jsp file, which works
> in one host, but in 3 others (with exactly the same seetings) it
> doesn't :( .. and I've no idea, why :(
>
> test.jsp:
> ################
> <% for (int i=0; i < 10; i++) { %>
> zeile <%= i %> <br>
> <% } %>
> ################
>
> At http://webteam.at:8080/tomcat/test.jsp it works
>
> docBase:
>
> drwxr-xr-x 2 web156 ftponly 4096 Aug 18 16:09 tomcat
>
> and the file:
>
> -rwxrwxrwx 1 web156 ftponly 64 Aug 16 18:32 test.jsp
>
> but at
>
> http://pronet.at:8080/tomcat/test.jsp I get an error, as seen in the
> browser
>
> docBase in this case .. same permissions:
>
> drwxr-xr-x 2 web10 ftponly 4096 Aug 18 18:37 tomcat
>
> File:
>
> -rwxrwxrwx 1 web10 ftponly 64 Aug 18 16:01 test.jsp
>
> There is another host I've tried with different directory names .. but
> allways the same error:
>
> AppBase: /home/www/web200/html/servlet
>
> docBase: myapp
>
> http://eko-immobilien.at:8080/myapp/test.jsp
>
> I can't see any differences between all these hosts and context
> settings .. but the jsp only works with
> http://webteam.at:8080/tomcat/test.jsp.
>
> Another "crazy" thing: At the admin panel I can see further hosts and
> contexts, which are NOT in the actual server.xml .. and if I want to
> delete them, I get an error.
>
> I'm very despairing .. so if anybody could help me ..
>
> Many, many Thanks
> Robert
>
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
8/18/2003 2:25 PM John Turner:
> appBase != docBase
>
> Right now your Context is using the same value for its docBase as your
> Host is using for its appBase. Your docBase cannot be your appBase, not
> to mention that your Context is using a path of "/webapps" which could
> cause all sorts of weird problems.
>
> Set appBase = /home/www/vhostxx/html/webapps but then set docBase =
> "myApp" or something like that (it is automatically relative to the
> appBase).
Thanks 4 answer John
We don't use appBase = docBasethe and the term "webapps" as path- or
dir-name any longer .. but another mistake was definititly the
ownership of the appBase-dir .. the user "tomcat4" was not in the same
group as the owner of appBase.
drwxr-xr-x 3 web10 ftponly 4096 Aug 18 15:08 appbase_dir
Now the user "tomcat" is in ftponly group too .. and "he" got the dir now.
But now I've some very hard troubles with a test.jsp file, which works
in one host, but in 3 others (with exactly the same seetings) it
doesn't :( .. and I've no idea, why :(
test.jsp:
################
<% for (int i=0; i < 10; i++) { %>
zeile <%= i %> <br>
<% } %>
################
At http://webteam.at:8080/tomcat/test.jsp it works
docBase:
drwxr-xr-x 2 web156 ftponly 4096 Aug 18 16:09 tomcat
and the file:
-rwxrwxrwx 1 web156 ftponly 64 Aug 16 18:32 test.jsp
but at
http://pronet.at:8080/tomcat/test.jsp I get an error, as seen in the
browser
docBase in this case .. same permissions:
drwxr-xr-x 2 web10 ftponly 4096 Aug 18 18:37 tomcat
File:
-rwxrwxrwx 1 web10 ftponly 64 Aug 18 16:01 test.jsp
There is another host I've tried with different directory names .. but
allways the same error:
AppBase: /home/www/web200/html/servlet
docBase: myapp
http://eko-immobilien.at:8080/myapp/test.jsp
I can't see any differences between all these hosts and context
settings .. but the jsp only works with
http://webteam.at:8080/tomcat/test.jsp.
Another "crazy" thing: At the admin panel I can see further hosts and
contexts, which are NOT in the actual server.xml .. and if I want to
delete them, I get an error.
I'm very despairing .. so if anybody could help me ..
Many, many Thanks
Robert
server.xml:
############################################
<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="9"
port="8005" shutdown="SHUTDOWN">
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0" jsr77Names="false"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<GlobalNamingResources>
<Environment name="simpleValue" override="true"
type="java.lang.Integer" value="30"/>
<Resource auth="Container" description="User database that can be
updated and saved" name="UserDatabase" scope="Shareable"
type="org.apache.catalina.UserDatabase"/>
<Resource description="User database that can be updated and
saved" name="UserDatabase2" scope="Shareable"
type="org.apache.catalina.UserDatabase"/>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
<ResourceParams name="UserDatabase2">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users2.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<Service className="org.apache.catalina.core.StandardService"
debug="9" name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="100" bufferSize="2048" compression="off"
connectionLinger="-1" connectionTimeout="20000" debug="0"
disableUploadTimeout="true" enableLookups="true"
maxKeepAliveRequests="100" maxProcessors="75" minProcessors="5"
port="8080"
protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
tcpNoDelay="true" useURIValidationHack="false">
<Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="10" bufferSize="2048" compression="off"
connectionLinger="-1" connectionTimeout="20000" debug="9"
disableUploadTimeout="false" enableLookups="true"
maxKeepAliveRequests="100" 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="9" defaultHost="localhost"
mapperClass="org.apache.catalina.core.StandardEngineMapper"
name="Standalone">
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web156/html/public" 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="webteam.at" unpackWARs="true">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="9"
docBase="/home/www/web156/html/public/tomcat/"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/tomcat" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="webteam_at_log." suffix=".txt"
timestamp="true" verbosity="4"/>
</Host>
<Host className="org.apache.catalina.core.StandardHost"
appBase="webapps" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="9"
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" displayName="Tomcat
Administration Application" docBase="../server/webapps/admin"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/admin" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Logger className="org.apache.catalina.logger.FileLogger"
debug="0" directory="logs" prefix="localhost_admin_log." suffix=".txt"
timestamp="true" verbosity="1"/>
</Context>
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="true" debug="9" docBase="examples"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/examples" privileged="false" reloadable="true"
swallowOutput="true" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Loader className="org.apache.catalina.loader.WebappLoader"
checkInterval="15" debug="9" delegate="false"
loaderClass="org.apache.catalina.loader.WebappClassLoader"
reloadable="true"/>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="localhost_examples_log."
suffix=".txt" timestamp="true" verbosity="4"/>
<Manager
className="org.apache.catalina.session.StandardManager"
algorithm="MD5" checkInterval="60" debug="9" duplicates="0"
expiredSessions="0" maxActive="0" maxActiveSessions="-1"
maxInactiveInterval="1800" pathname="SESSIONS.ser"
randomClass="java.security.SecureRandom" rejectedSessions="0"
sessionCounter="0">
</Manager>
<Parameter name="context.param.name" override="false"
value="context.param.value"/>
<Ejb home="com.wombat.empl.EmployeeRecordHome"
name="ejb/EmplRecord" remote="com.wombat.empl.EmployeeRecord"
type="Entity"/>
<Environment name="maxExemptions" override="true"
type="java.lang.Integer" value="15"/>
<Resource auth="SERVLET" name="jdbc/EmployeeAppDb"
scope="Shareable" type="javax.sql.DataSource"/>
<Resource auth="Container" name="mail/Session"
scope="Shareable" type="javax.mail.Session"/>
<ResourceParams name="jdbc/EmployeeAppDb">
<parameter>
<name>password</name>
<value></value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:HypersonicSQL:database</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.hsql.jdbcDriver</value>
</parameter>
<parameter>
<name>username</name>
<value>sa</value>
</parameter>
</ResourceParams>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceLink global="simpleValue"
name="linkToGlobalResource" type="java.lang.Integer"/>
</Context>
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" displayName="Tomcat
Manager Application" docBase="../server/webapps/manager"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/manager" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<ResourceLink global="UserDatabase" name="users"
type="org.apache.catalina.UserDatabase"/>
</Context>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true" verbosity="4"/>
</Host>
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web200/html/servlet" 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="eko-immobilien.at" unpackWARs="true">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" docBase="myapp"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/myapp" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
</Host>
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web10/html/public" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="9"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="pronet.at" unpackWARs="true">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="9"
docBase="/home/www/web10/html/public/tomcat/"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/tomcat" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="pronet_at_log." suffix=".txt"
timestamp="true" verbosity="4"/>
</Host>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="catalina_log." suffix=".txt"
timestamp="true" verbosity="4"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase" validate="true"/>
</Engine>
</Service>
Re: Tomcat MultiHosting problems
Posted by "Robert Zöhrer @ pronet.at" <ro...@pronet.at>.
8/18/2003 2:25 PM John Turner:
> appBase != docBase
>
> Right now your Context is using the same value for its docBase as your
> Host is using for its appBase. Your docBase cannot be your appBase, not
> to mention that your Context is using a path of "/webapps" which could
> cause all sorts of weird problems.
>
> Set appBase = /home/www/vhostxx/html/webapps but then set docBase =
> "myApp" or something like that (it is automatically relative to the
> appBase).
Thanks 4 answer John
We don't use appBase = docBasethe and the term "webapps" as path- or
dir-name any longer .. but another mistake was definititly the
ownership of the appBase-dir .. the user "tomcat4" was not in the same
group as the owner of appBase.
drwxr-xr-x 3 web10 ftponly 4096 Aug 18 15:08 appbase_dir
Now the user "tomcat" is in ftponly group too .. and "he" got the dir now.
But now I've some very hard troubles with a test.jsp file, which works
in one host, but in 3 others (with exactly the same seetings) it
doesn't :( .. and I've no idea, why :(
test.jsp:
################
<% for (int i=0; i < 10; i++) { %>
zeile <%= i %> <br>
<% } %>
################
At http://webteam.at:8080/tomcat/test.jsp it works
docBase:
drwxr-xr-x 2 web156 ftponly 4096 Aug 18 16:09 tomcat
and the file:
-rwxrwxrwx 1 web156 ftponly 64 Aug 16 18:32 test.jsp
but at
http://pronet.at:8080/tomcat/test.jsp I get an error, as seen in the
browser
docBase in this case .. same permissions:
drwxr-xr-x 2 web10 ftponly 4096 Aug 18 18:37 tomcat
File:
-rwxrwxrwx 1 web10 ftponly 64 Aug 18 16:01 test.jsp
There is another host I've tried with different directory names .. but
allways the same error:
AppBase: /home/www/web200/html/servlet
docBase: myapp
http://eko-immobilien.at:8080/myapp/test.jsp
I can't see any differences between all these hosts and context
settings .. but the jsp only works with
http://webteam.at:8080/tomcat/test.jsp.
Another "crazy" thing: At the admin panel I can see further hosts and
contexts, which are NOT in the actual server.xml .. and if I want to
delete them, I get an error.
I'm very despairing .. so if anybody could help me ..
Many, many Thanks
Robert
server.xml:
############################################
<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="9"
port="8005" shutdown="SHUTDOWN">
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0" jsr77Names="false"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<GlobalNamingResources>
<Environment name="simpleValue" override="true"
type="java.lang.Integer" value="30"/>
<Resource auth="Container" description="User database that can be
updated and saved" name="UserDatabase" scope="Shareable"
type="org.apache.catalina.UserDatabase"/>
<Resource description="User database that can be updated and
saved" name="UserDatabase2" scope="Shareable"
type="org.apache.catalina.UserDatabase"/>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
<ResourceParams name="UserDatabase2">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users2.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<Service className="org.apache.catalina.core.StandardService"
debug="9" name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="100" bufferSize="2048" compression="off"
connectionLinger="-1" connectionTimeout="20000" debug="0"
disableUploadTimeout="true" enableLookups="true"
maxKeepAliveRequests="100" maxProcessors="75" minProcessors="5"
port="8080"
protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
tcpNoDelay="true" useURIValidationHack="false">
<Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
</Connector>
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="10" bufferSize="2048" compression="off"
connectionLinger="-1" connectionTimeout="20000" debug="9"
disableUploadTimeout="false" enableLookups="true"
maxKeepAliveRequests="100" 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="9" defaultHost="localhost"
mapperClass="org.apache.catalina.core.StandardEngineMapper"
name="Standalone">
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web156/html/public" 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="webteam.at" unpackWARs="true">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="9"
docBase="/home/www/web156/html/public/tomcat/"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/tomcat" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="webteam_at_log." suffix=".txt"
timestamp="true" verbosity="4"/>
</Host>
<Host className="org.apache.catalina.core.StandardHost"
appBase="webapps" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="9"
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" displayName="Tomcat
Administration Application" docBase="../server/webapps/admin"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/admin" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Logger className="org.apache.catalina.logger.FileLogger"
debug="0" directory="logs" prefix="localhost_admin_log." suffix=".txt"
timestamp="true" verbosity="1"/>
</Context>
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="true" debug="9" docBase="examples"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/examples" privileged="false" reloadable="true"
swallowOutput="true" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<Loader className="org.apache.catalina.loader.WebappLoader"
checkInterval="15" debug="9" delegate="false"
loaderClass="org.apache.catalina.loader.WebappClassLoader"
reloadable="true"/>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="localhost_examples_log."
suffix=".txt" timestamp="true" verbosity="4"/>
<Manager
className="org.apache.catalina.session.StandardManager"
algorithm="MD5" checkInterval="60" debug="9" duplicates="0"
expiredSessions="0" maxActive="0" maxActiveSessions="-1"
maxInactiveInterval="1800" pathname="SESSIONS.ser"
randomClass="java.security.SecureRandom" rejectedSessions="0"
sessionCounter="0">
</Manager>
<Parameter name="context.param.name" override="false"
value="context.param.value"/>
<Ejb home="com.wombat.empl.EmployeeRecordHome"
name="ejb/EmplRecord" remote="com.wombat.empl.EmployeeRecord"
type="Entity"/>
<Environment name="maxExemptions" override="true"
type="java.lang.Integer" value="15"/>
<Resource auth="SERVLET" name="jdbc/EmployeeAppDb"
scope="Shareable" type="javax.sql.DataSource"/>
<Resource auth="Container" name="mail/Session"
scope="Shareable" type="javax.mail.Session"/>
<ResourceParams name="jdbc/EmployeeAppDb">
<parameter>
<name>password</name>
<value></value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:HypersonicSQL:database</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.hsql.jdbcDriver</value>
</parameter>
<parameter>
<name>username</name>
<value>sa</value>
</parameter>
</ResourceParams>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceLink global="simpleValue"
name="linkToGlobalResource" type="java.lang.Integer"/>
</Context>
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" displayName="Tomcat
Manager Application" docBase="../server/webapps/manager"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/manager" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
<ResourceLink global="UserDatabase" name="users"
type="org.apache.catalina.UserDatabase"/>
</Context>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true" verbosity="4"/>
</Host>
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web200/html/servlet" 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="eko-immobilien.at" unpackWARs="true">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" docBase="myapp"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/myapp" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
</Host>
<Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web10/html/public" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="9"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="pronet.at" unpackWARs="true">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="9"
docBase="/home/www/web10/html/public/tomcat/"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/tomcat" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="pronet_at_log." suffix=".txt"
timestamp="true" verbosity="4"/>
</Host>
<Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="catalina_log." suffix=".txt"
timestamp="true" verbosity="4"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase" validate="true"/>
</Engine>
</Service>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by John Turner <to...@johnturner.com>.
appBase != docBase
Right now your Context is using the same value for its docBase as your
Host is using for its appBase. Your docBase cannot be your appBase, not
to mention that your Context is using a path of "/webapps" which could
cause all sorts of weird problems.
Set appBase = /home/www/vhostxx/html/webapps but then set docBase =
"myApp" or something like that (it is automatically relative to the
appBase).
Then your Context would look something like this:
<Context path="" docBase="myApp">
Then the URL would be:
http://www.www.domain_vhostxx.at:8080/file.jsp
So you want:
appBase: /home/www/vhostxx/html/webapps
docBase: /home/www/vhostxx/html/webapps/myApp
JSP: /home/www/vhostxx/html/webapps/myApp/my.jsp
WEB-INF: /home/www/vhostxx/html/webapps/myApp/WEB-INF
John
Robert Zöhrer @ pronet.at wrote:
> Hi all,
>
> I've great problems with Tomcat and setting up a context in a 2nd
> (virtual) host:
>
> my environmemt:
>
> OS: Redhat Linux
> Platform: Intel x86
>
> TC version: 4.1
>
> tomcat4.conf:
> --- cut -----
> CATALINA_HOME="/var/tomcat4"
> JASPER_HOME="/var/tomcat4"
> CATALINA_TMPDIR="/var/tomcat4/temp"
> ---- cut -----
>
> 1) There is a dir called /home/www/vhostxx/html/webapps for the
> vhost-files. There User uploaded her Apps via FTP. There are just a
> few jsp-files and a WEB-INF-subdir with a standard web.xml.
>
> Permissions:
>
> drwxrwxrwx 2 vhostxx_user ftponly 4096 Aug 12 14:03 webapps
>
> 2) Host and Context are defined in server.xml (see below)
>
> But when i define the Context (shown below) with den Admin Panel, I
> get this error from the Logger:
>
> 2003-08-15 14:27:21 StandardContext[/webapps]: Resources start failed:
> java.lang.IllegalArgumentException: Document base
> /home/www/vhostxx/html/webapps does not exist or is not a
> readable directory
>
> and
>
> 2003-08-15 14:27:21 StandardContext[/webapps]: Context startup failed
> due to previous errors
> 2003-08-15 14:27:21 StandardContext[/webapps]: Exception during
> cleanup after start failed
>
> :(
>
> 3) When I try http://www.www.domain_vhostxx.at:8080/webapps/file.jsp
>
> I also get
>
> HTTP Status 404 - /webapps/file.jsp
> type Status report
> message /webapps/file.jsp
> description The requested resource (/webapps/file.jsp) is not available.
>
> Of course, this is, because "Context startup failed" .. but why is
> this so? TC has also add a work-dir for this host and context but the
> context-working-dir is empty :(
>
> There are no basicly problems, because the Admin Panel (localhost,
> context: /admin) works fine.
>
> Is it a problem, when appBase, docBase are outside $CATALINA_HOME?
>
> Are there spezial permission needs for the appBase, docBase dirs? But
> now there are permissions to ALL with
>
> drwxrwxrwx 2 vhostxx_user ftponly 4096 Aug 12 14:03 webapps
>
> Is there anything that I don't know?
>
> I'ld be very very glad if anybody has an idea, because I've studied
> the docs for days and can't see a mistake in my config?
>
> Thanks a lot Robert
>
>
>>>From server.xml:
>
> ############# Standard Localhost with Admin & Manager Context #######
>
> <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" displayName="Tomcat
> Administration Application" docBase="../server/webapps/admin"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/admin" privileged="true" reloadable="false"
> swallowOutput="false" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> <Logger className="org.apache.catalina.logger.FileLogger"
> debug="0" directory="logs" prefix="localhost_admin_log." suffix=".txt"
> timestamp="true" verbosity="1"/>
> </Context>
>
> <Context className="org.apache.catalina.core.StandardContext"
> cachingAllowed="true"
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> cookies="true" crossContext="false" debug="0" displayName="Tomcat
> Manager Application" docBase="../server/webapps/manager"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/manager" privileged="true" reloadable="false"
> swallowOutput="false" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> <ResourceLink global="UserDatabase" name="users"
> type="org.apache.catalina.UserDatabase"/>
> </Context>
> </Host>
>
> ############# my new Host ###########################
>
> <Host className="org.apache.catalina.core.StandardHost"
> appBase="/home/www/vhostxx/html/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="www.domain_vhostxx.at" unpackWARs="true">
> <Alias>domain_vhostxx.at</Alias>
>
> <Context className="org.apache.catalina.core.StandardContext"
> cachingAllowed="true"
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> cookies="true" crossContext="true" debug="0"
> docBase="/home/www/vhostxx/html/webapps"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/webapps" privileged="false" reloadable="true"
> swallowOutput="true" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> </Context>
> </Host>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Tomcat MultiHosting problems
Posted by John Turner <to...@johnturner.com>.
appBase != docBase
Right now your Context is using the same value for its docBase as your
Host is using for its appBase. Your docBase cannot be your appBase, not
to mention that your Context is using a path of "/webapps" which could
cause all sorts of weird problems.
Set appBase = /home/www/vhostxx/html/webapps but then set docBase =
"myApp" or something like that (it is automatically relative to the
appBase).
Then your Context would look something like this:
<Context path="" docBase="myApp">
Then the URL would be:
http://www.www.domain_vhostxx.at:8080/file.jsp
So you want:
appBase: /home/www/vhostxx/html/webapps
docBase: /home/www/vhostxx/html/webapps/myApp
JSP: /home/www/vhostxx/html/webapps/myApp/my.jsp
WEB-INF: /home/www/vhostxx/html/webapps/myApp/WEB-INF
John
Robert Zöhrer @ pronet.at wrote:
> Hi all,
>
> I've great problems with Tomcat and setting up a context in a 2nd
> (virtual) host:
>
> my environmemt:
>
> OS: Redhat Linux
> Platform: Intel x86
>
> TC version: 4.1
>
> tomcat4.conf:
> --- cut -----
> CATALINA_HOME="/var/tomcat4"
> JASPER_HOME="/var/tomcat4"
> CATALINA_TMPDIR="/var/tomcat4/temp"
> ---- cut -----
>
> 1) There is a dir called /home/www/vhostxx/html/webapps for the
> vhost-files. There User uploaded her Apps via FTP. There are just a
> few jsp-files and a WEB-INF-subdir with a standard web.xml.
>
> Permissions:
>
> drwxrwxrwx 2 vhostxx_user ftponly 4096 Aug 12 14:03 webapps
>
> 2) Host and Context are defined in server.xml (see below)
>
> But when i define the Context (shown below) with den Admin Panel, I
> get this error from the Logger:
>
> 2003-08-15 14:27:21 StandardContext[/webapps]: Resources start failed:
> java.lang.IllegalArgumentException: Document base
> /home/www/vhostxx/html/webapps does not exist or is not a
> readable directory
>
> and
>
> 2003-08-15 14:27:21 StandardContext[/webapps]: Context startup failed
> due to previous errors
> 2003-08-15 14:27:21 StandardContext[/webapps]: Exception during
> cleanup after start failed
>
> :(
>
> 3) When I try http://www.www.domain_vhostxx.at:8080/webapps/file.jsp
>
> I also get
>
> HTTP Status 404 - /webapps/file.jsp
> type Status report
> message /webapps/file.jsp
> description The requested resource (/webapps/file.jsp) is not available.
>
> Of course, this is, because "Context startup failed" .. but why is
> this so? TC has also add a work-dir for this host and context but the
> context-working-dir is empty :(
>
> There are no basicly problems, because the Admin Panel (localhost,
> context: /admin) works fine.
>
> Is it a problem, when appBase, docBase are outside $CATALINA_HOME?
>
> Are there spezial permission needs for the appBase, docBase dirs? But
> now there are permissions to ALL with
>
> drwxrwxrwx 2 vhostxx_user ftponly 4096 Aug 12 14:03 webapps
>
> Is there anything that I don't know?
>
> I'ld be very very glad if anybody has an idea, because I've studied
> the docs for days and can't see a mistake in my config?
>
> Thanks a lot Robert
>
>
>>From server.xml:
>
> ############# Standard Localhost with Admin & Manager Context #######
>
> <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" displayName="Tomcat
> Administration Application" docBase="../server/webapps/admin"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/admin" privileged="true" reloadable="false"
> swallowOutput="false" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> <Logger className="org.apache.catalina.logger.FileLogger"
> debug="0" directory="logs" prefix="localhost_admin_log." suffix=".txt"
> timestamp="true" verbosity="1"/>
> </Context>
>
> <Context className="org.apache.catalina.core.StandardContext"
> cachingAllowed="true"
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> cookies="true" crossContext="false" debug="0" displayName="Tomcat
> Manager Application" docBase="../server/webapps/manager"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/manager" privileged="true" reloadable="false"
> swallowOutput="false" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> <ResourceLink global="UserDatabase" name="users"
> type="org.apache.catalina.UserDatabase"/>
> </Context>
> </Host>
>
> ############# my new Host ###########################
>
> <Host className="org.apache.catalina.core.StandardHost"
> appBase="/home/www/vhostxx/html/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="www.domain_vhostxx.at" unpackWARs="true">
> <Alias>domain_vhostxx.at</Alias>
>
> <Context className="org.apache.catalina.core.StandardContext"
> cachingAllowed="true"
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> cookies="true" crossContext="true" debug="0"
> docBase="/home/www/vhostxx/html/webapps"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/webapps" privileged="false" reloadable="true"
> swallowOutput="true" useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
> </Context>
> </Host>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>