Re: virtual host configuration

2010-04-22 Thread Leon Kolchinsky
Try here http://myunster.com/blog/10.html

Best Regards,
Leon Kolchinsky

On Thu, Apr 22, 2010 at 12:00, daulat khan  wrote:

> Hi,
>
> I am planning to setup virtual hosting in apache-tomcat integrated
> setup. Please share useful links or docs which will help me in
> accomplishing this.
>
>
>
> also  using,
>
> httpd v2.2.14
> tomcat v6.0.20
> tomcat connector v1.2.28
>
>
> Thanks,
> Daulatkhan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: virtual host configuration

2010-04-21 Thread Konstantin Kolinko
2010/4/22 daulat khan :
> Hi,
>
> I am planning to setup virtual hosting in apache-tomcat integrated
> setup. Please share useful links or docs which will help me in
> accomplishing this.
>
> also  using,
>
> httpd v2.2.14
> tomcat v6.0.20
> tomcat connector v1.2.28
>

http://localhost:8080/docs/virtual-hosting-howto.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



virtual host configuration

2010-04-21 Thread daulat khan
Hi,

I am planning to setup virtual hosting in apache-tomcat integrated
setup. Please share useful links or docs which will help me in
accomplishing this.



also  using,

httpd v2.2.14
tomcat v6.0.20
tomcat connector v1.2.28


Thanks,
Daulatkhan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-25 Thread Pid

On 25/09/2009 14:03, Pid wrote:

On 25/09/2009 08:26, hepabolu wrote:



awarnier wrote:


hepabolu wrote:
...


However, from the Tomcat docs I understand that any change to
server.xml
requires a restart of Tomcat which would mean that the existing
(non-dummy)
hosts which are already in production, i.e. up and running, will
also be
taken offline. This is the heart of the problem...


Just as another look on the issue.



This may be one case where the added complication of having an Apache
httpd in front of Tomcat is justified.




Do you have any info on processing times using apache + mod_jk?


Your app will be the defining factor in terms of responsivity, there is
an overhead when using HTTPD in front of Tomcat but it's usually
negligible compared to the time spent in your application.


Ignore this below, it's an answer to another thread.
Teach me to rush some replies out... Doh.

p


OP: Chris asked you if you were using session replication, I'd also ask
if so, which type?

If your interest is in load balancing, you are using sticky sessions and
you are not too bothered about forcing re-login or session
re-initialisation when the client shifts node, you could disable session
replication.

A positive change in performance would confirm that session replication
is causing the slow down in the one node.


You didn't specify (did you?) which algorithm you are using to load
balance, have you experimented with the various options available?


p




Thanks.

Bye, Helma





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-25 Thread Pid

On 25/09/2009 08:26, hepabolu wrote:



awarnier wrote:


hepabolu wrote:
...


However, from the Tomcat docs I understand that any change to server.xml
requires a restart of Tomcat which would mean that the existing
(non-dummy)
hosts which are already in production, i.e. up and running, will also be
taken offline. This is the heart of the problem...


Just as another look on the issue.



This may be one case where the added complication of having an Apache
httpd in front of Tomcat is justified.




Do you have any info on processing times using apache + mod_jk?


Your app will be the defining factor in terms of responsivity, there is 
an overhead when using HTTPD in front of Tomcat but it's usually 
negligible compared to the time spent in your application.



OP: Chris asked you if you were using session replication, I'd also ask 
if so, which type?


If your interest is in load balancing, you are using sticky sessions and 
you are not too bothered about forcing re-login or session 
re-initialisation when the client shifts node, you could disable session 
replication.


A positive change in performance would confirm that session replication 
is causing the slow down in the one node.



You didn't specify (did you?) which algorithm you are using to load 
balance, have you experimented with the various options available?



p




Thanks.

Bye, Helma



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-25 Thread hepabolu


awarnier wrote:
> 
> hepabolu wrote:
> ...
> 
>> However, from the Tomcat docs I understand that any change to server.xml
>> requires a restart of Tomcat which would mean that the existing
>> (non-dummy)
>> hosts which are already in production, i.e. up and running, will also be
>> taken offline. This is the heart of the problem...
> 
> Just as another look on the issue.
> 
> 
> 
> This may be one case where the added complication of having an Apache 
> httpd in front of Tomcat is justified.
> 

I'm not sure if this will not result in unwanted side-effects. Each webapp
should store/retrieve information from a MySQL database (one per
host/client). There should be absolutely no possibility of a mix of
information of clients.
Each webapp serves as a webservice to an external webapp/webservice. They
communicate using the predefined domainname.
I don't think it's a good idea to have one webapp handle all requests based
on parameters alone. There are already a lot of parameters to handle a
single request, figuring out which 'client' should respond makes it all the
more complicated.

I could look into the 'multiple webapps in a single domain' setup. I just
wonder if there's (a) extra processing time due to the apache + mod_jk
configuration and (b) added complexity to figure out which webapp is the
culprit in case of troubles. I'll take (b) for granted if (a) is almost
nothing as I'm already having troubles with timeout deadlines.

Do you have any info on processing times using apache + mod_jk?

Thanks.

Bye, Helma
-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration---best-practise--tp25512289p25530061.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-21 Thread George Sexton




> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Friday, September 18, 2009 3:26 PM
> To: Tomcat Users List
> Subject: Re: Virtual host configuration - best practise?
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> George,
> 
> On 9/18/2009 3:15 PM, George Sexton wrote:
> > No. Use the host manager to deploy/undeploy virtual hosts on the fly.
> When
> > you re-start tomcat, have a program create the server.xml so that all
> of the
> > one's you deployed using the host manager are represented.
> 
> It's been demonstrated that you can use the XML parser to include one
> XML file in another file (say, include myhosts.xml from server.xml).
> Given that, you could have a process whereby you update Tomcat
> on-the-fly, but also modify the myhosts.xml file at the same time.
> 
> This seems a bit safer, as you're not re-writing server.xml in order to
> add hosts to your configuration. It also means that you don't have to
> remember to save those new hosts somewhere (possibly server.xml)
> because
> the code that does the on-the-fly deployments can also record those
> host
> additions.
> 


Chris,


That's actually a pretty neat technique. I think I'll modify my code to do that 
as part of my conversion to 6.0.

My tomcat startup script actually re-writes the server.xml on the fly. It 
hasn't caused any problems for me but this is still a cleaner approach.

FWIW, I'm running 800+ virtual hosts on 3 servers.



George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-21 Thread Jeffrey Janner
Someone correct me if I'm wrong, but just changing server.xml does not
require an "immediate" restart of Apache, correct?
Hepabolu could use the host-manager to add his hosts on-the-fly, and
then add the necessary changes to the server.xml so that the next time
he does restart his server/Tomcat, the new hosts will be there.
I run a similar setup with quite similar requirements, and often modify
the server.xml without immediate restarts.  When I have a new host, I
use a "test" tomcat instance to set up and test the new config, then
copy the changes to the eventual live instance's server.xml, leaving
both running until I can get a window to make the switch.
I had tried the host-manager app at one time, but abandoned it since it
didn't update the server.xml file (plus I had some more esoteric config
issues at the time). If I was going to be manually updating files
anyway, I preferred a more obvious method.

-Original Message-
From: George Sexton [mailto:geor...@mhsoftware.com] 
Sent: Friday, September 18, 2009 2:15 PM
To: 'Tomcat Users List'
Subject: RE: Virtual host configuration - best practise?


> -Original Message-
> From: hepabolu [mailto:hepab...@gmail.com]
> Sent: Friday, September 18, 2009 1:06 PM
> To: users@tomcat.apache.org
> Subject: RE: Virtual host configuration - best practise?
> 
> 
> 
> 
> George Sexton wrote:
> >
> >
> > Another way of getting there is scripting commands to the Tomcat
Host
> > Manager application. You can deploy the new hosts on the fly. It's
> pretty
> > straight forward.
> >
> > The downside to this approach, and probably JMX as well is that it
> doesn't
> > update server.xml and you'll have to create a startup routine that
> > generates
> > a new server.xml with the virtual hosts on the fly.
> >
> >
> 
> And a new server.xml requires a restart of Tomcat? Which would
> basically be
> a variation of my current setup. Correct?
> 
> Bye, Helma


No. Use the host manager to deploy/undeploy virtual hosts on the fly.
When
you re-start tomcat, have a program create the server.xml so that all of
the
one's you deployed using the host manager are represented.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585



***  NOTICE  *
This message is intended for the use of the individual or entity to which 
it is addressed and may contain information that is privileged, 
confidential, and exempt from disclosure under applicable law.  If the 
reader of this message is not the intended recipient or the employee or 
agent responsible for delivering this message to the intended recipient, 
you are hereby notified that any dissemination, distribution, or copying 
of this communication is strictly prohibited.  If you have received this 
communication in error, please notify us immediately by reply or by 
telephone (call us collect at 512-343-9100) and immediately delete this 
message and all its attachments.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-20 Thread hepabolu



Caldarale, Charles R wrote:
> 
>> From: hepabolu [mailto:hepab...@gmail.com]
>> Subject: Re: Virtual host configuration - best practise?
>> 
>> Somebody suggested using the host manager, but from the Tomcat docs I
>> understand that the host manager is intended for deploying webapps in a
>> single domain
> 
> No, that's the doc for the manager webapp.  The suggestion was to use the
> host-manager, a completely different utility packaged with Tomcat, and one
> that does exactly what you want.
> 

AHA. THAT one. I've been looking for more info on this one but couldn't find
it. I vaguely remember I came across some text stating that this webapp was
not done yet. So I abandoned it for my purposes.

I'll see if I can find more info on it. Thanks.

Bye, Helma
-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration---best-practise--tp25512289p25530059.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-19 Thread Caldarale, Charles R
> From: hepabolu [mailto:hepab...@gmail.com]
> Subject: Re: Virtual host configuration - best practise?
> 
> Somebody suggested using the host manager, but from the Tomcat docs I
> understand that the host manager is intended for deploying webapps in a
> single domain

No, that's the doc for the manager webapp.  The suggestion was to use the 
host-manager, a completely different utility packaged with Tomcat, and one that 
does exactly what you want.

Can't find any doc for host-manager, but the URLs to access it are:
/host-manager/html/
/host-manager/list
/host-manager/add
/host-manager/remove
/host-manager/start
/host-manager/stop

The first URL gives you browser access to its capabilities, the others are 
primarily for command-line access via curl or wget or equivalent.  You will 
need a role of "admin" to use the host-manager.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-19 Thread André Warnier

hepabolu wrote:
...


However, from the Tomcat docs I understand that any change to server.xml
requires a restart of Tomcat which would mean that the existing (non-dummy)
hosts which are already in production, i.e. up and running, will also be
taken offline. This is the heart of the problem...


Just as another look on the issue.

You mentioned previously that all the hosts run the same webapp, but 
that the configuration varies somewhat from host to host.
The applicability to your case depends a bit on how many distinct 
settings this means, but how about a setup like this :


- a front-end Apache, with VirtualHosts defined, and a mod_jk connector 
to the back-end Tomcat.  Adding a VirtualHost to Apache does not require 
a full Apache restart, just a reload of the configuration, which is less 
disruptive.

- in Tomcat, a single default virtual host, with a single webapp
- when an Apache VirtualHost proxies a request to Tomcat, it arranges to 
pass some "request attributes" to distinguish which Apache VirtualHost 
this was
- at the Tomcat level, the webapp reacts differently, not in function of 
its static setup, but in function of the request attributes it gets from 
Apache (this can be done with a servlet filter e.g.)


You can also have different webapps under Tomcat (one per "virtual 
host"), and have the front-end Apache can, depending on the VirtualHost, 
proxy calls to the one or the other.  At the Tomcat level, adding a 
webapp (as opposed to adding a Host) does not require a restart.


This may be one case where the added complication of having an Apache 
httpd in front of Tomcat is justified.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-19 Thread hepabolu

Hi,


Christopher Schultz-2 wrote:
> 
> It's been demonstrated that you can use the XML parser to include one
> XML file in another file (say, include myhosts.xml from server.xml).
> Given that, you could have a process whereby you update Tomcat
> on-the-fly, but also modify the myhosts.xml file at the same time.
> 

This sounds like a good idea. I was actually looking for something like this
but couldn't find info. Can you give me a URL to more detailed explanation
as to how or what?

I'm sorry for not making my problem clear: I'm not so much concerned with
adding hosts to the server.xml but more with the restart of Tomcat. Right
now I've created 10 dummy virtual host entries in the server.xml so all I
have to do is adjust the domainname in appropriate places. I will look into
the various suggestions in this thread to see if this can be optimized.
However, from the Tomcat docs I understand that any change to server.xml
requires a restart of Tomcat which would mean that the existing (non-dummy)
hosts which are already in production, i.e. up and running, will also be
taken offline. This is the heart of the problem: is there a possibility to
add a new host (or modify the domainname of an existing dummy) to the
server.xml WITHOUT having to restart Tomcat and therefore all hosts that are
already in production?

Somebody suggested using the host manager, but from the Tomcat docs I
understand that the host manager is intended for deploying webapps in a
single domain, i.e.

domainX
  webappA
  webappB

while I have the following situation:

domainX
  webappA
domainY
   webappA

Thanks.

Bye, Helma
-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration---best-practise--tp25512289p25520332.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

George,

On 9/18/2009 3:15 PM, George Sexton wrote:
> No. Use the host manager to deploy/undeploy virtual hosts on the fly. When
> you re-start tomcat, have a program create the server.xml so that all of the
> one's you deployed using the host manager are represented.

It's been demonstrated that you can use the XML parser to include one
XML file in another file (say, include myhosts.xml from server.xml).
Given that, you could have a process whereby you update Tomcat
on-the-fly, but also modify the myhosts.xml file at the same time.

This seems a bit safer, as you're not re-writing server.xml in order to
add hosts to your configuration. It also means that you don't have to
remember to save those new hosts somewhere (possibly server.xml) because
the code that does the on-the-fly deployments can also record those host
additions.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqz+ugACgkQ9CaO5/Lv0PCLEwCgjFctU2trBsHOOyapm+IlbdSC
Yt0AmgMGU+MzstX2uV4xta7DAdCnI+01
=rPtO
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-18 Thread George Sexton

> -Original Message-
> From: hepabolu [mailto:hepab...@gmail.com]
> Sent: Friday, September 18, 2009 1:06 PM
> To: users@tomcat.apache.org
> Subject: RE: Virtual host configuration - best practise?
> 
> 
> 
> 
> George Sexton wrote:
> >
> >
> > Another way of getting there is scripting commands to the Tomcat Host
> > Manager application. You can deploy the new hosts on the fly. It's
> pretty
> > straight forward.
> >
> > The downside to this approach, and probably JMX as well is that it
> doesn't
> > update server.xml and you'll have to create a startup routine that
> > generates
> > a new server.xml with the virtual hosts on the fly.
> >
> >
> 
> And a new server.xml requires a restart of Tomcat? Which would
> basically be
> a variation of my current setup. Correct?
> 
> Bye, Helma


No. Use the host manager to deploy/undeploy virtual hosts on the fly. When
you re-start tomcat, have a program create the server.xml so that all of the
one's you deployed using the host manager are represented.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-18 Thread hepabolu



George Sexton wrote:
> 
> 
> Another way of getting there is scripting commands to the Tomcat Host
> Manager application. You can deploy the new hosts on the fly. It's pretty
> straight forward.
> 
> The downside to this approach, and probably JMX as well is that it doesn't
> update server.xml and you'll have to create a startup routine that
> generates
> a new server.xml with the virtual hosts on the fly.
> 
> 

And a new server.xml requires a restart of Tomcat? Which would basically be
a variation of my current setup. Correct?

Bye, Helma
-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration---best-practise--tp25512289p25513923.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration - best practise?

2009-09-18 Thread George Sexton




> -Original Message-
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: Friday, September 18, 2009 11:12 AM
> To: Tomcat Users List
> Subject: Re: Virtual host configuration - best practise?
> 
> hepabolu wrote:
> > Hi,
> >
> > I need to create the following situation:
> > - each client uses a war (all use the same war file) with
> configuration
> > files that are different for every client
> > - each client's configuration should be addressable by a different
> URL, e.g.
> > domainX, domainY
> >
> > So in Tomcat 5.5 I created a Host entry for each client in the
> > server.xml/Engine, as well as the necessary configuration directories
> etc.
> >
> > The whole setup works except for one thing: I don't know the clients
> > domainnames yet, so I need to add Host entries as new clients need to
> be
> > added. This however means I need to restart Tomcat each time I've
> added a
> > Host entry, which means that all existing clients are offline as
> well. This
> > is an unacceptable situation.
> >
> > Is there a different method for setting things up that gives the same
> result
> > but allows adding virtual hosts on the fly, i.e. without restarting
> Tomcat?
> 
> Have you tried JMX?

Another way of getting there is scripting commands to the Tomcat Host
Manager application. You can deploy the new hosts on the fly. It's pretty
straight forward.

The downside to this approach, and probably JMX as well is that it doesn't
update server.xml and you'll have to create a startup routine that generates
a new server.xml with the virtual hosts on the fly.


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual host configuration - best practise?

2009-09-18 Thread Mark Thomas
hepabolu wrote:
> Hi, 
> 
> I need to create the following situation:
> - each client uses a war (all use the same war file) with configuration
> files that are different for every client
> - each client's configuration should be addressable by a different URL, e.g.
> domainX, domainY
> 
> So in Tomcat 5.5 I created a Host entry for each client in the
> server.xml/Engine, as well as the necessary configuration directories etc.
> 
> The whole setup works except for one thing: I don't know the clients
> domainnames yet, so I need to add Host entries as new clients need to be
> added. This however means I need to restart Tomcat each time I've added a
> Host entry, which means that all existing clients are offline as well. This
> is an unacceptable situation.
> 
> Is there a different method for setting things up that gives the same result
> but allows adding virtual hosts on the fly, i.e. without restarting Tomcat?

Have you tried JMX?

Mark




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Virtual host configuration - best practise?

2009-09-18 Thread hepabolu

Hi, 

I need to create the following situation:
- each client uses a war (all use the same war file) with configuration
files that are different for every client
- each client's configuration should be addressable by a different URL, e.g.
domainX, domainY

So in Tomcat 5.5 I created a Host entry for each client in the
server.xml/Engine, as well as the necessary configuration directories etc.

The whole setup works except for one thing: I don't know the clients
domainnames yet, so I need to add Host entries as new clients need to be
added. This however means I need to restart Tomcat each time I've added a
Host entry, which means that all existing clients are offline as well. This
is an unacceptable situation.

Is there a different method for setting things up that gives the same result
but allows adding virtual hosts on the fly, i.e. without restarting Tomcat?

Thanks.

Bye, Helma
-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration---best-practise--tp25512289p25512289.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration problems

2009-05-12 Thread Caldarale, Charles R
> From: JDawg72 [mailto:mr.j@hotmail.com]
> Subject: RE: Virtual host configuration problems
> 
> what has to happen when I need to add another
> domain and application to this instance of Tomcat?

A domain may have many webapps deployed for it.  Each domain also has to have 
one default webapp.  When you have multiple, independent domains, each will 
need its own  element with a unique appBase setting.  Under each appBase, 
place the domain's default webapp in the ROOT directory (or use a ROOT.war 
file).

 - 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.



Re: Virtual host configuration problems

2009-05-12 Thread Hassan Schroeder
On Tue, May 12, 2009 at 10:13 AM, JDawg72  wrote:
>
> ... but what has to happen when I need to add another
> domain and application to this instance of Tomcat?



-- 
Hassan Schroeder  hassan.schroe...@gmail.com

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration problems

2009-05-12 Thread JDawg72

Thanks Chuck, that worked but what has to happen when I need to add another
domain and application to this instance of Tomcat?

Jeremy


Caldarale, Charles R wrote:
> 
>> From: JDawg72 [mailto:mr.j@hotmail.com]
>> Subject: RE: Virtual host configuration problems
>> 
>> >Your default webapp should be located in /home/userId/public_html/ROOT
>> -
>> nowhere else, and its > element >>should be in
>> /home/userId/public_html/ROOT/META-INF/context.xml.
>> Also I am not clear on the suggestion of using “ROOT”.
> 
> It's not a suggestion - it's a requirement.  The default webapp must be
> named ROOT, so change the name of the directory from myapp to ROOT (must
> be upper case).
> 
>  - 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.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration-problems-tp23501325p23506692.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration problems

2009-05-12 Thread Caldarale, Charles R
> From: JDawg72 [mailto:mr.j@hotmail.com]
> Subject: RE: Virtual host configuration problems
> 
> >Your default webapp should be located in /home/userId/public_html/ROOT
> -
> nowhere else, and its > element >>should be in
> /home/userId/public_html/ROOT/META-INF/context.xml.
> Also I am not clear on the suggestion of using “ROOT”.

It's not a suggestion - it's a requirement.  The default webapp must be named 
ROOT, so change the name of the directory from myapp to ROOT (must be upper 
case).

 - 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.



RE: Virtual host configuration problems

2009-05-12 Thread JDawg72

Thanks for you reply Chuck,

I am using DailyRazor as my web hosting provider.  The operating system is
Linux kernel version 2.6.27.18-14, Tomcat version 5.5.26, and JVM is
1.5.0_15-b04.  This is a private JVM configuration provided by DailyRazor. 
I purchased this server configuration because I am planning on hosting more
then one application and domain with this instance of Tomcat.  I have read
in the Tomcat documentation and discovered the sections you mention about
context elements being located in the server.xml file, however this is the
configuration file I started with from my hosting provider.  With this
hosting provider they tell me that I do not have access to webapp directory
so I am assuming I need the two context descriptors for the admin and
manager Tomcat applications.  I will go ahead and remove all of the context
entries and put them in conf/Catalina/mydomain.com/

My context.xml file is in META-INF and not WEB-INF.  Sorry about the typo. 
I will make the you mentioned in my app contect.xml file.

>Your default webapp should be located in /home/userId/public_html/ROOT -
nowhere else, and its > element >>should be in
/home/userId/public_html/ROOT/META-INF/context.xml. 
Also I am not clear on the suggestion of using “ROOT”.

Jeremy

Caldarale, Charles R wrote:
> 
>> From: JDawg72 [mailto:mr.j@hotmail.com]
>> Subject: Virtual host configuration problems
>> 
>> That being said, I am having a problem configuring my web application
>> to load when I type  www.mydomain.com in my browser address bar.
>> My application does work as long as I type www.mydomain.com/myapp 
>> for the url.
> 
> If you're on a reasonably recent version of Tomcat, the default webapp
> must be named ROOT (case sensitive).
> 
> You didn't explicitly tell us the version of Tomcat you're using, although
> the config indicates it's probably 5.5.26; please confirm that, and let us
> know what JVM you're using and what OS.
> 
>> I have tried changing my server.xml host context and 
>> WEB-INF/context.xml with no luck.
> 
> The context.xml file belongs in META-INF, not WEB-INF; let's hope the
> above was a typo, since you do refer to META-INF later.
> 
>> > docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/admin"
>> path="/admin"
>> privileged="true"
>> reloadable="true">
>> 
>> > docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/manager"
>> path="/manager"
>> privileged="true"
>> reloadable="true">
>>   > name="users"
>> type="org.apache.catalina.UserDatabase"/>
>> 
>> > docBase="/home/userId/public_html/myapp"
>> path=""
>> reloadable="true">
>> 
> 
>  elements should not be placed in server.xml; that's extremely
> poor practice left over from older versions of Tomcat.  What you have
> above is a real mess; remove the  elements from server.xml and
> place them where they belong.  For the webapps stored outside of the
> appBase directory (admin and manager), this should be
> conf/Catalina/mydomain.com/[appName].xml.  Your default webapp should be
> located in /home/userId/public_html/ROOT - nowhere else, and its 
> element should be in /home/userId/public_html/ROOT/META-INF/context.xml.
> 
> Also note that if you have a single , it's not necessary to give it
> your domain name or supply any aliases; using the default of "localhost"
> will be fine.
> 
> I would configure an HTTP  to allow testing of Tomcat without
> the complication of using httpd in front of it.  (In fact, if you're not
> using httpd for something useful - such as PHP - get rid of it; it's only
> making things more complicated and slowing you down.)
> 
>> META-INF/context.xml
> 
> Where is the above directory located?
> 
>>  
> The path and docBase attributes are not allowed when the  element
> is in a webapp's META-INF/context.xml file.
> 
> Fix all of the above and see what happens.
> 
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration-problems-tp23501325p23505238.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Virtual host configuration problems

2009-05-12 Thread Caldarale, Charles R
> From: JDawg72 [mailto:mr.j@hotmail.com]
> Subject: Virtual host configuration problems
> 
> That being said, I am having a problem configuring my web application
> to load when I type  www.mydomain.com in my browser address bar.
> My application does work as long as I type www.mydomain.com/myapp 
> for the url.

If you're on a reasonably recent version of Tomcat, the default webapp must be 
named ROOT (case sensitive).

You didn't explicitly tell us the version of Tomcat you're using, although the 
config indicates it's probably 5.5.26; please confirm that, and let us know 
what JVM you're using and what OS.

> I have tried changing my server.xml host context and 
> WEB-INF/context.xml with no luck.

The context.xml file belongs in META-INF, not WEB-INF; let's hope the above was 
a typo, since you do refer to META-INF later.

>  docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/admin"
> path="/admin"
> privileged="true"
> reloadable="true">
> 
>  docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/manager"
> path="/manager"
> privileged="true"
> reloadable="true">
>name="users"
> type="org.apache.catalina.UserDatabase"/>
> 
>  docBase="/home/userId/public_html/myapp"
> path=""
> reloadable="true">
> 

 elements should not be placed in server.xml; that's extremely poor 
practice left over from older versions of Tomcat.  What you have above is a 
real mess; remove the  elements from server.xml and place them where 
they belong.  For the webapps stored outside of the appBase directory (admin 
and manager), this should be conf/Catalina/mydomain.com/[appName].xml.  Your 
default webapp should be located in /home/userId/public_html/ROOT - nowhere 
else, and its  element should be in 
/home/userId/public_html/ROOT/META-INF/context.xml.

Also note that if you have a single , it's not necessary to give it your 
domain name or supply any aliases; using the default of "localhost" will be 
fine.

I would configure an HTTP  to allow testing of Tomcat without the 
complication of using httpd in front of it.  (In fact, if you're not using 
httpd for something useful - such as PHP - get rid of it; it's only making 
things more complicated and slowing you down.)

> META-INF/context.xml

Where is the above directory located?

>  element is 
in a webapp's META-INF/context.xml file.

Fix all of the above and see what happens.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Virtual host configuration problems

2009-05-12 Thread JDawg72

I have to admit that I am new to application server administration, and being
a programmer, I have a new found respect for the administrators I work with.

That being said, I am having a problem configuring my web application to
load when I type  www.mydomain.com in my browser address bar.  My
application does work as long as I type www.mydomain.com/myapp for the url.  
I have tried changing my server.xml host context and WEB-INF/context.xml
with no luck.  The closest I get to this working is the application starts
to load but as soon as it gets to a point in the servlet where it is
referencing my formBean it stops loading the page.  When I look at the log I
notice that the first error fails to get the database resource need to build
the form.  Then of course I get jsp exceptions because the formBean failed
to initialize.  Below is the first line in of the first exception that is
thrown as well as my server.xml and META-INF/context.xml entries.  

I have been through several forum threads that are similar to this issue,
but I have had no luck translating the suggestions successfully, and have
yet to find out why it works as long as I qualify the context path in the
url.  Any help would be greatly appreciated.

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'

server.xml

  
  
  
  

  
  



  
  
www.mydomain.com



  



  

  

META-INF/context.xml



   
  
-- 
View this message in context: 
http://www.nabble.com/Virtual-host-configuration-problems-tp23501325p23501325.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Virtual Host Configuration problem, Help needed!!!

2007-03-29 Thread Mark Thomas
jit.mehta wrote:
> Hi! I want to configure Virtual Host on my Tomcat 5 standalone server but I'm
> unable to run it. 
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

HTH,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Virtual Host Configuration problem, Help needed!!!

2007-03-29 Thread jit.mehta

Hi! I want to configure Virtual Host on my Tomcat 5 standalone server but I'm
unable to run it. 
Still no clue! this is how I did it. 
Conf/server.xml entries after the local host entries- 

  
 

I added a configuration file ROOT.xml in conf/catalina/buzz for the host 

  

I also created directoris buzz/WEB_INF and WEB-INF/classes & WEB-INF/lib in
Webapps Directory. 

but still my created vitrual host doesnt get up. 
I wud highly appricate if anybody help me to fix this issue...Im in dire
straits !!!


thanks 

Rock on 
Jit

-- 
View this message in context: 
http://www.nabble.com/Virtual-Host-Configuration-problem%2C-Help-needed%21%21%21-tf3485535.html#a9730541
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Host configuration

2006-03-19 Thread Nic Daniau
Never really done this myself, but there is something about host aliases in
the docs for 5.5:
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html#Host%20Name%20Aliases

Does this help?
Nic

On 19/03/06, Matt Anderson <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I was configuring the virtual hosting using version 5.5.15 and I found
> something different to what I remember. When I add a host for
> www.somedomain.com.au and I then enter in http://somedomain.com.au it does
> not work unless I add the www. at the beginning... To get around this I
> added to hosts with the following names and this solution works.
>
> www.somedomain.com.au
> somedomain.com
>
> but surely I am making some sort of mistake, why do I need to add the two
> hosts in order to have the same address load the same web application. I
> remeber in the past it did not matter, I added one and the other was
> recognised. I am hoping I have explained it well enough and if anyone can
> shed some light on this situation it would be greatly appreciated! Thanks
> in
> advance.
>
> Matt
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Virtual Host configuration

2006-03-18 Thread Matt Anderson
Hi All,

I was configuring the virtual hosting using version 5.5.15 and I found
something different to what I remember. When I add a host for
www.somedomain.com.au and I then enter in http://somedomain.com.au it does
not work unless I add the www. at the beginning... To get around this I
added to hosts with the following names and this solution works.

www.somedomain.com.au
somedomain.com

but surely I am making some sort of mistake, why do I need to add the two
hosts in order to have the same address load the same web application. I
remeber in the past it did not matter, I added one and the other was
recognised. I am hoping I have explained it well enough and if anyone can
shed some light on this situation it would be greatly appreciated! Thanks in
advance.

Matt

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Alias element in Tomcat 3.2.x virtual host configuration

2005-11-29 Thread Mieke Banderas
As far as I understand you write virtual host server configuration like
this with the Alias element like this:
"host.com" as an alias to virtual host www.host.com.

What's the syntax in Tomcat 3.2.x?

My virtual host looks like this now:
  

 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]