tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Re: TOMCAT with multiple sites (one on https, others on http)
Date Thu, 09 Aug 2012 16:23:13 GMT
On 8/9/2012 8:29 AM, Massimo Chirivì - Ict Consultant wrote:
> Attached file is my server.xml, the service catalina with all virtual host
> work correctly, the service catalinassl is not working
> the subfolders of the folder /catalinassl/site3 are empty.
> you kindly tell me the changes to make in server.xml
> I'm not understanding
> thank
> Massimo Chirivì


I'm not sure if this is a language problem or some other problem. I 
don't speak Italian, but maybe someone else on the list does.

I can empathize with language barriers (I've had to struggle with 
documentation written in Bahasa - which i know zero about). Maybe you 
have a team mate that can help translate the Tomcat documentation and 
Wiki article into Italian?

A point of clarification about path names.

File path names beginning with / are absolute path names. This means 
that when you write /webapps/site1, you are referring to a directory 
from the root of the file system - ie., /webapps/site1.

File path names not beginning with a / are relative path names. This 
means that the path names are relative to some base path.

In Tomcat, the base path starts at $CATALINA_BASE. This is where Tomcat 
is run from (gets a bit more complicated with distribution repackaging). 
For example, if I install and run Tomcat from:


Then $CATALINA_BASE becomes


A relative path name of "webapps" then becomes:


as an absolute path name in this particular sense.

So in your case, you need to have directories /webapps/site1, 
/webapps/site2, and /conf/site3 at the root of your file system. This is 
not a good thing.

That being said, you have not made any of the changes recommended by:

1) The documentation
2) The cited Wiki article
3) Several patient people on the mailing list

For your particular question, please note the following Context elements 
(again, this is very bad practice).

A. In Service Catalina

Host element with name="site1"
<Context path="" docBase="/webapps/site1" debug="0" reloadable="true"/>

Host element with name="site2"
<Context path="" docBase="/webapps/site2" debug="0" reloadable="true"/>

B. In Service Catalinassl

Host element with name="site1"
<Context path="" docBase="/webapps/site1" debug="0" reloadable="true"/>

As you can see, there is NO site3 Host element in any part of your 
server.xml. Therefore, there should be nothing in 
CATALINA_BASE/conf/Catalinassl/site3. There should also be nothing in 

/Catalinassl/site3 makes no sense as a path.

The path to the keystore file has nothing to do with where the appBase 
is (or docBase).

You are still using the wrong connector configuration for SSL. If you 
are loading the APR native libraries (and the logs you posted indicated 
that you are), you need to use the appropriate OpenSSL-style connector 
configuration (and certificate files).

I've posted the relevant portion of the server.xml for SSL from the 
online documentation in this thread before.

. . . . fresh out of cents (or sense)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message