You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mathias P.W Nilsson" <ma...@snyltarna.se> on 2008/09/22 13:12:19 UTC
Share war file / virtual hosts
Hi!
I have 3 different virtual hosts. Is there anyway these can share the same
war file and instance?
What I mean is that tomcat does not deploy the war file 3 times but uses the
same war instance?
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19605902.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by Hassan Schroeder <ha...@gmail.com>.
On Mon, Sep 22, 2008 at 1:22 PM, Mathias P.W Nilsson
<ma...@snyltarna.se> wrote:
>
> Ok! I tested with port 8080 and 8443 as ssl port with no luck.
> I only have 2 domains but tomcat complains about java.net.BindException:
> Cannot assign requested address: JVM_Bind:8080. Now I guess this isn't
> configured right so any pointers here would be greatly appreciated.
> <Connector connectionTimeout="20000" port="8080" address="90.2xx.xxx.x6"
> protocol="HTTP/1.1" redirectPort="443"/>
> <Connector connectionTimeout="20000" port="8080" address="90.2xx.xxx.x7"
> protocol="HTTP/1.1" redirectPort="443"/>
Ignoring the redirect port confusion and the unneeded AJP connector,
do you actually have both IP addresses configured on this box?
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by Hassan Schroeder <ha...@gmail.com>.
On Mon, Sep 22, 2008 at 11:36 AM, Mathias P.W Nilsson
<ma...@snyltarna.se> wrote:
>
> Yes, but how should I configure those connectors? I can't add port 443 to 3
> of them because
> then tomcat casts an error.
You can if each has a separate IP address, which is what you need
to make this work.
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: Re: Share war file / virtual hosts
>
> The last one about apache as a frontend would work.
I wouldn't recommend adding another node and associated complexity and overhead to fix the problem. Please try the suggested server.xml changes and report back.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
I actually think I got it up and running. I have assigned 2 addresses to the
same ethernet card and added 2 ssl connectors to server.xml and tomcat did
not crash. So I guess it was my lack of knowledge that did this.
I must have an mx record for the new ipaddress to know for a fact but thanks
all for putting up with my silly questions.
One connector with redirect to https port
2 connectors one for each ssl assigned to an ip.
// Mathias
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19616273.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: Re: Share war file / virtual hosts
>
> Yes thanks for pointing that out
Pointing what out? Many comments have been made.
> Is there anyway of testing this using local servers?
You can test it on one box, but you'll still have to configure all the IP addresses on that box's TCP/IP stack.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Yes thanks for pointing that out
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
redirectPort="8443"/>
<Connector SSLEnabled="true" clientAuth="false" keystoreFile="store"
keystorePass="store" maxThreads="150" address="IP1" port="8443"
protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS"/>
<Connector SSLEnabled="true" clientAuth="false" keystoreFile="store1"
keystorePass="store" maxThreads="150" address="IP2" port="8443"
protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLS"/>
Is there anyway of testing this using local servers?
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19616056.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by André Warnier <aw...@ice-sa.com>.
Mathias P.W Nilsson wrote:
> Ok! I tested with port 8080 and 8443 as ssl port with no luck.
> I only have 2 domains but tomcat complains about java.net.BindException:
> Cannot assign requested address: JVM_Bind:8080. Now I guess this isn't
> configured right so any pointers here would be greatly appreciated.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Server port="8005" shutdown="SHUTDOWN">
> <Listener SSLEngine="on"
> className="org.apache.catalina.core.AprLifecycleListener"/>
> <Listener className="org.apache.catalina.core.JasperListener"/>
> <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
> <Listener
> className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
> <GlobalNamingResources>
> <Resource auth="Container" description="User database that can be
> updated and saved"
> factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
> name="UserDatabase" pathname="conf/tomcat-users.xml"
> type="org.apache.catalina.UserDatabase"/>
> </GlobalNamingResources>
> <Service name="Catalina">
> <Connector connectionTimeout="20000" port="8080" address="90.2xx.xxx.x6"
> protocol="HTTP/1.1" redirectPort="443"/>
> <Connector connectionTimeout="20000" port="8080" address="90.2xx.xxx.x7"
> protocol="HTTP/1.1" redirectPort="443"/>
>
> <Connector SSLEnabled="true" clientAuth="false" keystoreFile="store"
> keystorePass="pass" maxThreads="150" address="90.2xx.xxx.x6" port="8443"
> redirectPort="443" protocol="HTTP/1.1" scheme="https" secure="true"
> sslProtocol="TLS"/>
>
> <Connector SSLEnabled="true" clientAuth="false" keystoreFile="store1"
> keystorePass="store" maxThreads="150" address="90.2xx.xxx.x7" port="8443"
> redirectPort="443" protocol="HTTP/1.1" scheme="https" secure="true"
> sslProtocol="TLS"/>
>
>
> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
> <Engine defaultHost="localhost" name="Catalina">
>
> <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
> resourceName="UserDatabase"/>
>
> <Host appBase="webapps" autoDeploy="true" name="localhost"
> unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
>
> </Host>
> </Engine>
> </Service>
> </Server>
I believe you confused your "Port" and "redirectPort" in the SSL
Connectors. The Port indicated in the SSL Connector should match the
"redirectPort" of the non-SSL corresponding Connector. I am not even
sure SSL Connectors have a redirectPort, but if they do, then you should
probably put 8080 there.
But the error message seems to say that the JVM tries to bind one of
your Connectors to port 8080, but that there is already something
listening on that port.
It would say that, if it misundertood your first Connectors, and bound
the first one to all IP adresses instead of just the one IP address.
Then when it comes to the second Connector, it also tries to bind it to
all IP adresses, port 8080, and it cannot because it's already taken by
your first Connector.
Are you sure the "address" attribute is the correct one ?
And if it is, are you sure that your IP interface(s) really are bound to
the different IP adresses you indicate ?
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Ok! I tested with port 8080 and 8443 as ssl port with no luck.
I only have 2 domains but tomcat complains about java.net.BindException:
Cannot assign requested address: JVM_Bind:8080. Now I guess this isn't
configured right so any pointers here would be greatly appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener SSLEngine="on"
className="org.apache.catalina.core.AprLifecycleListener"/>
<Listener className="org.apache.catalina.core.JasperListener"/>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<GlobalNamingResources>
<Resource auth="Container" description="User database that can be
updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
name="UserDatabase" pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase"/>
</GlobalNamingResources>
<Service name="Catalina">
<Connector connectionTimeout="20000" port="8080" address="90.2xx.xxx.x6"
protocol="HTTP/1.1" redirectPort="443"/>
<Connector connectionTimeout="20000" port="8080" address="90.2xx.xxx.x7"
protocol="HTTP/1.1" redirectPort="443"/>
<Connector SSLEnabled="true" clientAuth="false" keystoreFile="store"
keystorePass="pass" maxThreads="150" address="90.2xx.xxx.x6" port="8443"
redirectPort="443" protocol="HTTP/1.1" scheme="https" secure="true"
sslProtocol="TLS"/>
<Connector SSLEnabled="true" clientAuth="false" keystoreFile="store1"
keystorePass="store" maxThreads="150" address="90.2xx.xxx.x7" port="8443"
redirectPort="443" protocol="HTTP/1.1" scheme="https" secure="true"
sslProtocol="TLS"/>
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>
<Engine defaultHost="localhost" name="Catalina">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host appBase="webapps" autoDeploy="true" name="localhost"
unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
</Host>
</Engine>
</Service>
</Server>
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19615778.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by André Warnier <aw...@ice-sa.com>.
Mathias P.W Nilsson wrote:
> Thanks very much!
[...]
> By reading your thread I guess that a tomcat solution is out of the
> question?
>
No, I would not even dare to suggest that !
I don't want to be expelled from this list. ;-)
I was just proposing an alternative using things I know better than Tomcat.
But it seems from the previous answer by Chuck, that there should be no
problem with Tomcat after all.
When Chuck says that you do not need the <Alias>, he is of course right,
but he does not say why, so let me :
The "default Host" is the one that handles all requests for which Tomcat
tries to find a matching Hostname, and fails.
If there is a single Host under Tomcat (your case), then that Host is
(duh) automatically the "default Host".
And since you do not have a matching Host for either
"www.domain1.se" nor "www.domain1.com", Tomcat defaults to your default
Host to handle the requests for those (also).
And it would default to that one for any other requests that find
physically their way to your Tomcat, no matter what "Host:" header they
indicate.
CQFD.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Thanks very much!
The last one about apache as a frontend would work. ( I'm very new to this,
server set up as you probably seen. )
I am reading the headers to look at the request. I'm using a Wicket solution
with Spring and Hibernate. The Wicket handles 3 different looks with the
exact same java code and variations.
So when a request comes from www.domain1.com I look at the host header,
determine the look and Store and the create the Session object , payments
etc. Because I handle bank payments and Visa,Mastercard solutions I need the
solution to be SSL.
Now, the customer that I'm building this for wants to seperate the two
domains for the outside user but internal they use the same admin. ( They
don't sell the same articles on both sites. They can choose in the admin on
wich store they want to sell the item. In some cases on all sites with
different images and so forth ) Now I don't know if this explains why I need
3 connectors and one host but I can't think of another way.
Wicket and hibernate takes alot of ram and If I should use this 3 times
then, well the server will be overloaded, not to mention the Hibernate
errors that would occur when accessing an object in two different threads
and trying to persist.
By reading your thread I guess that a tomcat solution is out of the
question?
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19615102.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by André Warnier <aw...@ice-sa.com>.
Mathias P.W Nilsson wrote:
[...]
From the questions and answers ping-pong here, I get the impression
that you are trying to square the circle, and either bump into a Tomcat
issue or a Hibernate one (whatever that is).
Summary :
- for some reason I don't know nor would understand, you want only one
instance of this Hibernate to start, and that can only be the case if
you have a single Host.
- but you also want to be able to access this through 3 distinct IP
addresses, (not that I really understand HTTPS either but) because this
is HTTPS and HTTPS requires 3 different IP addresses for your 3
certificates.
- in Tomcat, different server IP addresses are handled at the Connector
level. But each Connector is linked to one Engine..
and there I am getting lost..
(although I believe you can have 3 Connectors for one Engine containing
one Host, and the one Host does not give a damn which name it's called
through as long as it is the default Host, but since I'm not on solid
ground there, I'll skip that discussion..)
But .. I have an alternative scenario for you :
Imagine you have one Apache httpd server front-end, set up to handle 3
different IP addresses with HTTPS. That should work, with IP-based
Virtual Hosts.
So these Apache Hosts handle the HTTPS part (certificates, decrypting
and such), and now inside each of these Apache Hosts we have things back
in clear (unencrypted).
Now each of these 3 Apache Virtual Hosts has a mod_jk Apache/Tomcat
connector, connecting to ... a single Tomcat back-end, with a single
Connector, a single Engine and a single Host (with no HTTPS needed),
under which you start a single Hibernate, et voila !
The Apache/mod_jk will nicely pass all (decrypted) headers to your
Tomcat back-end, where of course now it belongs to you to analyse the
"Host:" header to figure out which alias the original Client really
wanted to talk to.
You can also do all kinds of neat tricks with mod_rewrite, mod_headers,
mod_setenvif, mod_proxy, mod_auth_xxx and so on on the Apache side
before you even let Tomcat and Hibernate see anything at all of the
request. Even change the "Host:" header if you are so inclined.
The above will of course all work nicely on one machine, so the
Apache's/Tomcat connection is perfectly safe and maybe you do not need
to be concerned about HTTPS and authentication and all that stuff at all
on the Tomcat side. But even if you were to need this, the Apache hosts
can also pass on to Tomcat all the HTTPS stuff and you can still bother
with it if you want.
This sounds way too simple, there must be a snag somewhere.
But Apache httpd being a cousin of Apache Tomcat, at least the gurus on
this list will have to be polite when shooting down the solution.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: RE: Share war file / virtual hosts
>
> <Connector port="80" protocol="HTTP/1.1"
> connectionTimeout="20000"
> redirectPort="443" />
I think you need three port 80 <Connector> elements, one for each IP address. You may also want another <Connector> pair for IP address 127.0.0.1, if you want to access this Tomcat from a local browser.
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> <Alias>www.domain1.se</Alias>
> <Alias>www.domain1.com</Alias>
> <Alias>domain2.com</Alias>
> </Host>
The <Alias> elements aren't needed.
Try the above changes, and tell us what, if any, errors you get when Tomcat starts up.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Here is the configure. Of course the IP address are real addresses.
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" />
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="store1"
keystorePass="pass" address="83.xx.xx.x1"/>
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="store2"
keystorePass="pass" address="83.xx.xx.x2"/>
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="store3"
keystorePass="pass" address="83.xx.xx.x3"/>
<Connector port="8009" protocol="AJP/1.3" redirectPort="443" />
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>www.domain1.se</Alias>
<Alias>www.domain1.com</Alias>
<Alias>domain2.com</Alias>
</Host>
</Engine>
</Service>
</Server>
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19614378.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: RE: Share war file / virtual hosts
>
> I can't add port 443 to 3 of them because
> then tomcat casts an error.
Each must have a unique IP address. You should also have three non-SSL <Connector> elements, one for each IP address, using port 80 and redirecting to 443. Post your <Connector> config if you can't get it to work.
> I can only have one host otherwise hibernate will start 3
> times and that is bad.
Some would say even once is bad...
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Yes, but how should I configure those connectors? I can't add port 443 to 3
of them because
then tomcat casts an error.
I can only have one host otherwise hibernate will start 3 times and that is
bad.
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19613936.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: Re: Share war file / virtual hosts
>
> <Engine name="Catalina" defaultHost="localhost">
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> <Alias>www.domain1.se</Alias>
> <Alias>www.domain1.com</Alias>
> <Alias>www.domain2.se</Alias>
> </Host>
> </Engine>
>
> There baught from Thawte with the
> www.domain1.se, www.domain1.com, www.domain2.se
Now that's a different problem - you have three certificates, one for each domain. Each domain must have a separate IP address, and you need a <Connector> for each IP address. You do not need the <Alias> elements at all.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Just to get this straight.
Suppose I have this Host setting in server.xml
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>www.domain1.se</Alias>
<Alias>www.domain1.com</Alias>
<Alias>www.domain2.se</Alias>
</Host>
</Engine>
How can I make 3 connectors to match this. There baught from Thawte with the
www.domain1.se, www.domain1.com, www.domain2.se
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19613482.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Share war file / virtual hosts
Posted by Pid <p...@pidster.com>.
Mathias P.W Nilsson wrote:
> The problem is this.
>
> I would like to set up 3 connector that points to 3 different domains
> One Host element and many aliases. Can this be done? The connectors are
> https.
>
> <Connector port="443" ...... address="....1"/>
> <Connector port="443" ...... address="....2"/>
> <Connector port="443" ...... address="....3"/>
>
> <Host ="localhost">
> <Alias></Alias>
> </Host>
yes it can, you just need to set your hostname to be the default host in
the Engine element.
<Engine defaultHost="defaulthostname" ... >
<Host name="defaulthostname" ... >
- assuming you want to determine the application's response per domain
yourself.
p
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
The problem is this.
I would like to set up 3 connector that points to 3 different domains
One Host element and many aliases. Can this be done? The connectors are
https.
<Connector port="443" ...... address="....1"/>
<Connector port="443" ...... address="....2"/>
<Connector port="443" ...... address="....3"/>
<Host ="localhost">
<Alias></Alias>
</Host>
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19611322.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: RE: Share war file / virtual hosts
>
> Can The Host element support multiple ip addresses?
A <Host> element doesn't care about IP addresses; only a <Connector> does, and hen only if it's configured for a specific IP address. Each <Host> is concerned only with the symbolic name on the URL, and the designated default <Host> handles all requests that don't match specific <Host> names or <Alias> elements.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
I think it does, but then I have another ;)
Can The Host element support multiple ip addresses?
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19610708.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: RE: Share war file / virtual hosts
>
> Can I use Connectors to Aliases?
A <Connector> operates with all <Host> elements in the same <Engine>; the <Connector> only cares about IP address and port number, not DNS names.
(Not sure if that answers your question.)
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Can I use Connectors to Aliases?
--
View this message in context: http://www.nabble.com/Share-war-file---virtual-hosts-tp19605902p19610201.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Share war file / virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mathias P.W Nilsson [mailto:mathias@snyltarna.se]
> Subject: Share war file / virtual hosts
>
> I have 3 different virtual hosts. Is there anyway these can
> share the same war file and instance?
If you are using <Alias> entries for a single <Host>, then the webapp will be deployed only once.
If you are using multiple <Host> elements, then no, the webapp will be deployed for each <Host>, even if the docBase is identical for each. You could deploy dummy webapps on the secondary hosts that do nothing but redirect or forward to the primary, but that might be confusing to your end users.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org