You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Surya Mohan <su...@yahoo.com> on 2010/12/29 20:52:44 UTC
Shared SSL
Hello,
I am trying to use a shared SSL to configure the app for multiple clients using Tomcat 5.5.
It works fine for one client and trying to share the same for another client.
SSL : TestServer1.mycomp.com
<Host name="TestServer1.mycomp.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="/web" docBase="C:/Program Files/App/client1/web" crossContext="false" debug="0" />
</Host>
The above works fine, but when I try to add another client,
<Host name="TestServer1.mycomp.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="/client2/web" docBase="C:/Program Files/App/client2/web" crossContext="false" debug="0" />
</Host>
I get the error child name cannot be unique. I am using Tomcat to configure for the first time. I can understand this is due to the same host name. Since we have only one SSL created to share, any help would be greatly appreciated.
Regards,
Sur
Re: Shared SSL
Posted by André Warnier <aw...@ice-sa.com>.
Surya Mohan wrote:
>
>
>
>
>
>
> Hello,
> I am trying to use a shared SSL to configure the app for multiple clients using Tomcat 5.5.
>
> It works fine for one client and trying to share the same for another client.
>
> SSL : TestServer1.mycomp.com
>
> <Host name="TestServer1.mycomp.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
> <Context path="/web" docBase="C:/Program Files/App/client1/web" crossContext="false" debug="0" />
> </Host>
>
> The above works fine, but when I try to add another client,
>
>
> <Host name="TestServer1.mycomp.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
> <Context path="/client2/web" docBase="C:/Program Files/App/client2/web" crossContext="false" debug="0" />
> </Host>
>
> I get the error child name cannot be unique. I am using Tomcat to configure for the first time. I can understand this is due to the same host name. Since we have only one SSL created to share, any help would be greatly appreciated.
>
Try :
<Host name="TestServer1.mycomp.com" appBase="webapps" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/web" docBase="C:/Program Files/App/client1/web" crossContext="false"
debug="0" />
<Context path="/client2/web" docBase="C:/Program Files/App/client2/web"
crossContext="false" debug="0" />
</Host>
(and remove the second <Host..>)
And go read : http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html
(particularly the section "A word on Contexts" and following)
Note : you are not adding another "client", you are adding another "context" or "web
application".
Your usage of "client" (as a commercial term) is confusing in this context (technical).
In this (technical) context, a "client" is understood as a browser, which accesses a
server (Tomcat).
That for you the application "client1" and the application "client2" would effectively
each correspond to a different customer (commercially) is, literally, your business.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Shared SSL
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Surya,
On 12/29/2010 2:52 PM, Surya Mohan wrote:
> I am trying to use a shared SSL to configure the app for multiple
> clients using Tomcat 5.5.
What do you mean when you say "shared SSL"? Any number of clients can
use an SSL setup.
> It works fine for one client and trying to share the same for another client.
Have you tried the second client? I'm unsure what you mean by "client":
I suspect you mean "second hostname" given the other information in your
message.
> SSL : TestServer1.mycomp.com
>
> <Host name="TestServer1.mycomp.com" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
Must you specify the hostname for this <Host>?
> <Context
Don't do that: put <Context> elements into separate deployment
descriptors in $TOMCAT_HOME/conf/[hostname]/[appname].xml
> path="/web"
Don't do that: the name of the XML file will specify the webapp's path.
> crossContext="false"
This is the default, and there is no need to specify this.
> debug="0" />
The "debug" attribute is not recognized. Are you sure you are looking at
the right documentation for your version of Tomcat? You may want to take
another look.
> The above works fine, but when I try to add another client,
>
> <Host name="TestServer1.mycomp.com"
This <Host> has the same name as the above: that's not legal (nor is it
necessary: if you want two webapps under the same host, just use a
single <Host>).
> appBase="webapps"
Mistake: using the same appBase for two <Host> entries will
double-deploy all of your webapps from that directory, which is probably
not what you wanted to do.
> <Context path="/client2/web" docBase="C:/Program Files/App/client2/web" crossContext="false" debug="0" />
See my comments above.
> I get the error child name cannot be unique.
I'm guessing that the error you see is "child name *must be* unique".
> Since we have only one SSL created to share, any help would be greatly appreciated.
The solution is simple: simply use a single <Host>.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0dOqsACgkQ9CaO5/Lv0PD5/gCeL9ajIOFpHvWRLNi7JJPYnjnB
b8AAoJreFcH4LeWhIXvdau8PNPaNiYyY
=4HJC
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org