Re: Virtual Hosts, SSL, Tomcat

2011-10-15 Thread Mark Eggers
Mark,

Thanks for the weekend reply.

Too bad SNI in Java 7 is only client side for the time being.

So it looks like:

1. Wildcard certs and restrict server architecture
2. Apache mod_ssl SNI / mod_jk and restrict clients (may not be possible)
3. Traditional one cert per IP-based virtual host on Apache HTTPD and chew up 
IP address space.

. . . . just my two cents.
/mde/
( a new record in short messages from me ;-) )


- Original Message -
> From: Mark Thomas 
> To: Tomcat Users List 
> Cc: 
> Sent: Saturday, October 15, 2011 1:32 PM
> Subject: Re: Virtual Hosts, SSL, Tomcat
> 
> On 15/10/2011 21:26, Mark Eggers wrote:
>>  I potentially have the need to support multiple virtual hosts with SSL
>>  on a single IP address / port combination.
>> 
>>  This is called named virtual hosts on Apache HTTPD, and virtual hosts
>>  with a single connector on Tomcat.
>> 
>>  With a late version of Apache HTTPD / OpenSSL / mod_ssl, I can
>>  accomplish this using SNI ( server name indication - RFC 4366). IE (7
>>  and 8) will fail on Windows/XP, but all other reasonable browser / OS
>>  combinations are reported to work. I can then tie these named virtual
>>  hosts to the appropriate Tomcat virtual hosts via mod_jk.
> 
> That is the way I would recommend right now.
> 
>>  I'm also trying to do this natively on Tomcat (either 6.0.33 or
>>  7.0.22). Unfortunately this doesn't look to be easily possible.
>> 
>>  Based on the brief discussions on the mailing list and some other
>>  reading, I've come up with the following possible solutions.
>> 
>>  1. Use the APR connector for SSL
>> 
>>  This will get me the OpenSSL support for SNI. Unfortunately there
>>  doesn't seem to be a way to enter more than one certificate file.
> 
> Correct. There is no code in the APR/native connector to handle this. It
> should be possible to implement but it isn't there yet.
> 
>>  2. Use Java 7
>> 
>>  Java 7 has support for SNI.
> 
> Only on the client side, not the server side so this is not an option.
> 
>>  3. Use wildcard certificates
>> 
>>  If I restrict the virtual hosts on a physical host to a single domain
>>  or subdomain, I should be able to use *.some.domain.com as a way of
>>  providing a certificate.
> 
> Yep, that should work.
> 
>>  The easiest (and most generally usable) mechanisms still seem to be
>>  the standard unique address/port combination or a wildcard
>>  certificate.
>> 
>>  Have I missed (or misunderstood) the current state of SSL affairs?
> 
> They are a little worse than you thought.
> 
>>  Are
>>  there other practical solutions for running Tomcat virtual hosts with
>>  SSL?
> 
> Not that I can think of.
> 
> Mark

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



Re: Virtual Hosts, SSL, Tomcat

2011-10-15 Thread Mark Thomas
On 15/10/2011 21:26, Mark Eggers wrote:
> I potentially have the need to support multiple virtual hosts with SSL
> on a single IP address / port combination.
> 
> This is called named virtual hosts on Apache HTTPD, and virtual hosts
> with a single connector on Tomcat.
> 
> With a late version of Apache HTTPD / OpenSSL / mod_ssl, I can
> accomplish this using SNI ( server name indication - RFC 4366). IE (7
> and 8) will fail on Windows/XP, but all other reasonable browser / OS
> combinations are reported to work. I can then tie these named virtual
> hosts to the appropriate Tomcat virtual hosts via mod_jk.

That is the way I would recommend right now.

> I'm also trying to do this natively on Tomcat (either 6.0.33 or
> 7.0.22). Unfortunately this doesn't look to be easily possible.
> 
> Based on the brief discussions on the mailing list and some other
> reading, I've come up with the following possible solutions.
> 
> 1. Use the APR connector for SSL
> 
> This will get me the OpenSSL support for SNI. Unfortunately there
> doesn't seem to be a way to enter more than one certificate file.

Correct. There is no code in the APR/native connector to handle this. It
should be possible to implement but it isn't there yet.

> 2. Use Java 7
> 
> Java 7 has support for SNI.

Only on the client side, not the server side so this is not an option.

> 3. Use wildcard certificates
> 
> If I restrict the virtual hosts on a physical host to a single domain
> or subdomain, I should be able to use *.some.domain.com as a way of
> providing a certificate.

Yep, that should work.

> The easiest (and most generally usable) mechanisms still seem to be
> the standard unique address/port combination or a wildcard
> certificate.
> 
> Have I missed (or misunderstood) the current state of SSL affairs?

They are a little worse than you thought.

> Are
> there other practical solutions for running Tomcat virtual hosts with
> SSL?

Not that I can think of.

Mark

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



Re: Virtual hosts on Tomcat 7 for 3 webapps

2011-09-03 Thread Mark Eggers
- Original Message -

> From: Ioannis Parapontis 
> To: Tomcat Users List 
> Cc: 
> Sent: Saturday, September 3, 2011 3:25 PM
> Subject: Re: Virtual hosts on Tomcat 7 for 3 webapps
> 
>T hanks for the responses. The  reason i do not use apache is that the server 
> that runs my 3 apps works better with Tomcat. So it would be useful if some 
> guidelines are provided on how i should do this.
> 
> Sent from my iPhone


See the following Wiki entry for setting up virtual hosts. While it's geared 
towards a development environment, if you add the hosts to DNS it should work 
find in a production environment.

http://wiki.apache.org/tomcat/TomcatDevelopmentVirtualHosts


. . . . just my two cents.
/mde/


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



Re: Virtual hosts on Tomcat 7 for 3 webapps

2011-09-03 Thread Hassan Schroeder
On Sat, Sep 3, 2011 at 3:25 PM, Ioannis Parapontis
 wrote:

>  So it would be useful if some guidelines are provided on how i should do 
> this.

They are; see the documentation's "virtual hosting how-to"  :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Virtual hosts on Tomcat 7 for 3 webapps

2011-09-03 Thread Ioannis Parapontis
Thanks for the responses. The  reason i do not use apache is that the server 
that runs my 3 apps works better with Tomcat. So it would be useful if some 
guidelines are provided on how i should do this.

Sent from my iPhone

On 4 Σεπ 2011, at 1:01, Manuel Fernández 
Panzuela wrote:

> why you don't use virtualhost over apache ?
> 
> it's easier do it with it.
> 
> Un saludo
> 
> 
> 
> 2011/9/3 Ioannis Parapontis 
> 
>> Hi there
>> 
>> I have a server that runs 3 different web apps on the same ip but each on
>> its own port. eg ip:8080, ip:8081 and ip:8082. All apps should run
>> simultaneously and have their own folders.  Can a single Tomcat support the
>> 3 of them and can  i use virtual hosts on Tomcat alone ?
>> 
>> Thanks
>> 
>> Sent from my iPhone
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 

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



Re: Virtual hosts on Tomcat 7 for 3 webapps

2011-09-03 Thread Hassan Schroeder
On Sat, Sep 3, 2011 at 2:51 PM, Ioannis Parapontis
 wrote:

> I have a server that runs 3 different web apps on the same ip but each on its 
> own port. eg ip:8080, ip:8081 and ip:8082. All apps should run simultaneously 
> and have their own folders.  Can a single Tomcat support the 3 of them and 
> can  i use virtual hosts on Tomcat alone ?

Yes. You don't need Apache httpd in front of Tomcat, and you don't
even need to run on separate ports if you use named virtual servers.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

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



Re: Virtual hosts on Tomcat 7 for 3 webapps

2011-09-03 Thread Manuel Fernández Panzuela
why you don't use virtualhost over apache ?

it's easier do it with it.

Un saludo



2011/9/3 Ioannis Parapontis 

> Hi there
>
> I have a server that runs 3 different web apps on the same ip but each on
> its own port. eg ip:8080, ip:8081 and ip:8082. All apps should run
> simultaneously and have their own folders.  Can a single Tomcat support the
> 3 of them and can  i use virtual hosts on Tomcat alone ?
>
> Thanks
>
> Sent from my iPhone
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Virtual hosts on tomcat > 5.5.15

2009-11-18 Thread Matthias Pueski
Thank you both very much!

I did the following:

1.) Removed the context element from the server.xml
2.) added META-INF/context.xml to the web application and removed the
docBase attribute
3.) Removed the logger element
4.) moved the Web Application to a folder named ROOT, directly under the
appBase

Now everything works fine.


Am Mittwoch, den 18.11.2009, 08:18 -0600 schrieb Caldarale, Charles R:
> > From: Matthias Pueski [mailto:matth...@pueski.de]
> > Subject: Virtual hosts on tomcat > 5.5.15
> > 
> >  > appBase="/home/blah">
> >  > directory="logs"  prefix="virtual_log." suffix=".txt"
> > timestamp="true"/>
> 
> There is no  element allowed in 5.5.
> 
> > 
> 
> As Pid noted, an empty docBase is illegal.  Also, you should not be placing 
>  elements in server.xml.  If you want to define the default webapp 
> for a , name the .war file or directory ROOT (case sensitive), located 
> immediately under the  appBase directory.  The  element 
> belongs in the webapp's META-INF/context.xml file, or in 
> conf/Catalina/[host]/[appName].xml.
> 
> The fact that anything "worked" under 5.5.15 is purely accidental, since your 
> config is seriously broken.  It appears to have been copied verbatim from a 
> much older version of Tomcat (or perhaps derived from the tons of 
> misinformation about Tomcat out on the Internet), which is always bad 
> practice.
> 
>  - 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
> 


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



RE: Virtual hosts on tomcat > 5.5.15

2009-11-18 Thread Caldarale, Charles R
> From: Matthias Pueski [mailto:matth...@pueski.de]
> Subject: Virtual hosts on tomcat > 5.5.15
> 
>  appBase="/home/blah">
>  directory="logs"  prefix="virtual_log." suffix=".txt"
> timestamp="true"/>

There is no  element allowed in 5.5.

> 

As Pid noted, an empty docBase is illegal.  Also, you should not be placing 
 elements in server.xml.  If you want to define the default webapp for 
a , name the .war file or directory ROOT (case sensitive), located 
immediately under the  appBase directory.  The  element belongs 
in the webapp's META-INF/context.xml file, or in 
conf/Catalina/[host]/[appName].xml.

The fact that anything "worked" under 5.5.15 is purely accidental, since your 
config is seriously broken.  It appears to have been copied verbatim from a 
much older version of Tomcat (or perhaps derived from the tons of 
misinformation about Tomcat out on the Internet), which is always bad practice.

 - 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 hosts on tomcat > 5.5.15

2009-11-18 Thread Pid

On 18/11/2009 08:09, Matthias Pueski wrote:

Hi everybody,

currently I am running a few virtual domains on a root server with
tomcat 5.5.15 installed. So far everything works fine.

Now I just wanted to upgrade to the latest 5.5.x series in fact migrate
to version 5.5.28.

For example a virtual host on tomcat 5.5.15 has been configured as
follows:









That'll cause you some problems.
Do you have a META-INF/context.xml defined in your web app?

Have a read of the docs about how to properly define a Context and give 
us a shout if you can't fix it.


N.B. You'll probably have to rename the app "ROOT.war" or the exploded 
app dir "ROOT".


 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


p







Works fine without any problems.

If I switch now to Tomcat 5.5.28 the context is beeing deployed and the
JSP pages are accessible, but the whole WEB-INF folder including web.xml
and taglibs cannot be found.

I've noticed this behaviour with all tomcat versions later than 5.5.15.
Does anybody know if some configuration ore something else has changed?

Unfortunately I could not find any changelog or any other information
about this issue.

Does anybody have an idea, what's going wrong?

Any suggestions are really appreciated.

Cheers
Matthias



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




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



Re: Virtual Hosts and manager application.

2009-08-27 Thread Wesley Acheson
Thank you this seems to have fixed my problems.

Regards,
Wes

On Mon, Aug 24, 2009 at 9:10 PM, Pid  wrote:

> On 24/08/2009 16:09, Wesley Acheson wrote:
>
>> Hi,
>>
>
>> appbase="/home/servers/applications.westest"
>> unpackWARs="true" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>>   
>>
>
> Assuming that you've copied and pasted, set "appBase" not "appbase"
>
>
> p
>
>
>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Virtual Hosts and manager application.

2009-08-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wesley,

On 8/24/2009 5:20 PM, Wesley Acheson wrote:
> Off topic is it wrong to reply to two emails like this in one mail (for
> threading purposes?)

While not "wrong", it is kind of confusing. There's no particular reason
not to reply to messages individually.

>> Your apps will be deployed at least twice, maybe
>> more. Why don't you use just use the manager webapp from where it gets
>> installed by default (in CATALINA_HOME/server/webapps/manager)?
> 
> Its being deployed once per host.  I need more than one because the standard
> manager install only works for one host.

Right, I get it. But, since the manager app is also sitting in Tomcat's
webapps directory, which has auto-deploy turned-on for your localhost
, it will deployed there as well. I'm not sure there's really a
problem with that (it's just another deployment, under a different
), but I just wanted to point out that it /will/ be deployed twice
in your configuration, when you are trying to really have it only deploy
once (for testing).

> This is similar to the instructions at
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
> 
> A default Tomcat installation includes the manager. To add an instance of
> the Manager web application Context to a new host install the
> manager.xmlcontext configuration file in the
> $CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example:
> 
>   docBase="/usr/local/kinetic/tomcat6/server/webapps/manager">
> 

Somebody boned those instructions: the "path" attribute should not be set.

> If you have Tomcat configured to support multiple virtual hosts (websites)
> you would need to configure a Manager for each.

Yup, and it's as easy as duplicating the manager.xml file into each of
your conf/Catalina/[hostname] directories. You shouldn't have to do
anything else at all (except maybe modify the  to point to
maybe another type of user database.

> I did a direct copy [of manager.xml]. I only started changing it after I ran 
> into
> the problem even then I don't think I changed it much.

What problems were you having? Those mentioned in your original post
(like "Document base .../apache-tomcat-6.0.20/./manager does not
exist")? The only reason I can think of to get that odd error would be
to mess with the docBase in the manager.xml file itself.

Otherwise, I'm at a loss. I might suggest wiping your TC install and
starting again, step-by-step. It's possible that you're broken something
else somewhere and we'll have a tough time finding it.

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

iEYEARECAAYFAkqT9YAACgkQ9CaO5/Lv0PCS1QCghtkCCglzZj19CqywFXyRipb6
EAYAnifZVMGkJb5IkzjTnOEKE6LCaRqG
=7s1B
-END PGP SIGNATURE-

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



Re: Virtual Hosts and manager application.

2009-08-24 Thread Wesley Acheson
I'm back to work on thursday so I won't be able to try any suggested fixes
till then.  I'll let you know.

Off topic is it wrong to reply to two emails like this in one mail (for
threading purposes?)

On Mon, Aug 24, 2009 at 9:10 PM, Pid  wrote:

> On 24/08/2009 16:09, Wesley Acheson wrote:
>
>> Hi,
>>
>
>> appbase="/home/servers/applications.westest"
>> unpackWARs="true" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>>   
>>
>
> Assuming that you've copied and pasted, set "appBase" not "appbase"
>
> p
>

Wow good spot. I wouldn't have noticed maybe this is causing the problem.


On Mon, Aug 24, 2009 at 9:17 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Wes,
>
> On 8/24/2009 12:18 PM, Wesley Acheson wrote:
> > Comments below.  The one thing that may be unusual about my server.xml
> (see
> > initial email) is the fact that server.xml is specifying docRoots that
> are
> > parellel with my tomcat installation not in a sub folder. I've a sneaking
> > suspicion that this would fix the problem but I don't want to do that.
>
> Aah, yes. This:
>
> >> unpackWARs="true" autoDeploy="true"
> > xmlValidation="false" xmlNamespaceAware="false">
> >   
>
> Plus this:
>
> > 
> >  >  privileged="true" antiResourceLocking="false"
> > antiJARLocking="false">
> > 
>
> Will lead to confusion. Your apps will be deployed at least twice, maybe
> more. Why don't you use just use the manager webapp from where it gets
> installed by default (in CATALINA_HOME/server/webapps/manager)?


Its being deployed once per host.  I need more than one because the standard
manager install only works for one host.

This is similar to the instructions at
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html

A default Tomcat installation includes the manager. To add an instance of
the Manager web application Context to a new host install the
manager.xmlcontext configuration file in the
$CATALINA_BASE/conf/[enginename]/[hostname] folder. Here is an example:




If you have Tomcat configured to support multiple virtual hosts (websites)
you would need to configure a Manager for each.


>
> > Honestly my first version of the manager.xml was a simple copy out of a
> host
> > created with host manager.  I thought this was the easiest way to get a
> > working config, without being limited to the limitations of host-manager
> > (Hosts not persisted after restart). It had those attributes so my file
> > does.
>
> I would use the manager.xml file unchanged, except for its path (and
> possibly file name), of course.


Thats what I did a direct copy. I only started changing it after I ran into
the problem even then I don't think I changed it much.

>
>
> > I'm trying to deploy 3 managers but I focused on 1,
> > cashier.westest.example.com
>
> Okay. I so you should have (as you already do):
>
> >> appbase="/home/servers/cashier.westest"
> > unpackWARs="true" autoDeploy="true"
> > xmlValidation="false" xmlNamespaceAware="false">
> >   
>
> Then, copy the stock manager.xml into
> CATALINA_BASE/conf/Catalina/cashier.westest.example.com/
>
> Wouldn't that do it?


Thats where I ran into problems

>
>
> > I'm pretty sure its this one because I get the logged messages when I
> change
> > the manager.xml Its the only one being reloaded in that instance.  Or am
> I
> > wrong with that?
>
> It's probably being loaded twice because autoDeploy="true" for your
> "localhost" .


Sorry this is a miss-communication on my behalf. What I meant was not that
its being deployed twice but that I was sure that tc only reloaded the
context that had been altered.



>
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkqS5zgACgkQ9CaO5/Lv0PCmZgCfa4Tc4eoiebsvWAKvo11v0SzX
> 92IAnAp/RoGEJs7y19STKxJxrWPzPqc8
> =ZSwD
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Virtual Hosts and manager application.

2009-08-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wes,

On 8/24/2009 12:18 PM, Wesley Acheson wrote:
> Comments below.  The one thing that may be unusual about my server.xml (see
> initial email) is the fact that server.xml is specifying docRoots that are
> parellel with my tomcat installation not in a sub folder. I've a sneaking
> suspicion that this would fix the problem but I don't want to do that.

Aah, yes. This:

>unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>   

Plus this:

> 
>   privileged="true" antiResourceLocking="false"
> antiJARLocking="false">
> 

Will lead to confusion. Your apps will be deployed at least twice, maybe
more. Why don't you use just use the manager webapp from where it gets
installed by default (in CATALINA_HOME/server/webapps/manager)?

> Honestly my first version of the manager.xml was a simple copy out of a host
> created with host manager.  I thought this was the easiest way to get a
> working config, without being limited to the limitations of host-manager
> (Hosts not persisted after restart). It had those attributes so my file
> does.

I would use the manager.xml file unchanged, except for its path (and
possibly file name), of course.

> I'm trying to deploy 3 managers but I focused on 1,
> cashier.westest.example.com

Okay. I so you should have (as you already do):

>appbase="/home/servers/cashier.westest"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>   

Then, copy the stock manager.xml into
CATALINA_BASE/conf/Catalina/cashier.westest.example.com/

Wouldn't that do it?

> I'm pretty sure its this one because I get the logged messages when I change
> the manager.xml Its the only one being reloaded in that instance.  Or am I
> wrong with that?

It's probably being loaded twice because autoDeploy="true" for your
"localhost" .

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

iEYEARECAAYFAkqS5zgACgkQ9CaO5/Lv0PCmZgCfa4Tc4eoiebsvWAKvo11v0SzX
92IAnAp/RoGEJs7y19STKxJxrWPzPqc8
=ZSwD
-END PGP SIGNATURE-

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



Re: Virtual Hosts and manager application.

2009-08-24 Thread Pid

On 24/08/2009 16:09, Wesley Acheson wrote:

Hi,



   
   


Assuming that you've copied and pasted, set "appBase" not "appbase"

p







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



Re: Virtual Hosts and manager application.

2009-08-24 Thread Wesley Acheson
Hi All,

Comments below.  The one thing that may be unusual about my server.xml (see
initial email) is the fact that server.xml is specifying docRoots that are
parellel with my tomcat installation not in a sub folder. I've a sneaking
suspicion that this would fix the problem but I don't want to do that.


On Mon, Aug 24, 2009 at 5:39 PM, Jonathan Mast
wrote:
> You need to specify the "path" attribute in the Context tag.  I would
> recommend something other than just "manager" as I've see malicious bots
> looking for it.

True but for the moment on our internal network on a developer server I just
want to get something working.  I'll configure more things later.

> I would also remove the anitResourceLocking and antiJARLocking attrs, why
do
> you think you need them?

Honestly my first version of the manager.xml was a simple copy out of a host
created with host manager.  I thought this was the easiest way to get a
working config, without being limited to the limitations of host-manager
(Hosts not persisted after restart). It had those attributes so my file
does.



On Mon, Aug 24, 2009 at 6:02 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jonathan,
>
> On 8/24/2009 11:39 AM, Jonathan Mast wrote:
> > You need to specify the "path" attribute in the Context tag.
>
> Er, no. The name of the file specifies the context path. No "path"
> attribute is necessary. In fact, it will likely confuse things.


I previously tried with the path before my initial email.  I didn't list all
the steps I had gone through to try to fix it.

>
>
> > java.lang.IllegalArgumentException: Document base
> > /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a
> > readable directory
>
> Wes,
> Are you sure you're looking at the right file? How many managers are you
> trying to deploy? One for each ? How about starting with just a
> single one to get it working. It looks like you may have several of them
> configured, and maybe are confusing the warnings with each other.
>
> - -chris


I'm trying to deploy 3 managers but I focused on 1,
cashier.westest.example.com

I'm pretty sure its this one because I get the logged messages when I change
the manager.xml Its the only one being reloaded in that instance.  Or am I
wrong with that?

I'm also getting 404 errors when I hit
http://cashier.westest.example.com/manager/html so I know the changes
haven't fixed this one.







> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkqSuasACgkQ9CaO5/Lv0PDp3wCgmKFvVz+H5XaCoihnzc20iFqA
> 74AAoK6zRaq82xZgj5DtlM9gPg8r5OkH
> =vI3M
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Virtual Hosts and manager application.

2009-08-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan,

On 8/24/2009 11:39 AM, Jonathan Mast wrote:
> You need to specify the "path" attribute in the Context tag.

Er, no. The name of the file specifies the context path. No "path"
attribute is necessary. In fact, it will likely confuse things.

> java.lang.IllegalArgumentException: Document base
> /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a
> readable directory

Wes,
Are you sure you're looking at the right file? How many managers are you
trying to deploy? One for each ? How about starting with just a
single one to get it working. It looks like you may have several of them
configured, and maybe are confusing the warnings with each other.

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

iEYEARECAAYFAkqSuasACgkQ9CaO5/Lv0PDp3wCgmKFvVz+H5XaCoihnzc20iFqA
74AAoK6zRaq82xZgj5DtlM9gPg8r5OkH
=vI3M
-END PGP SIGNATURE-

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



Re: Virtual Hosts and manager application.

2009-08-24 Thread Jonathan Mast
You need to specify the "path" attribute in the Context tag.  I would
recommend something other than just "manager" as I've see malicious bots
looking for it.

I would also remove the anitResourceLocking and antiJARLocking attrs, why do
you think you need them?

On Mon, Aug 24, 2009 at 11:21 AM, Wesley Acheson
wrote:

> Thanks Jonathan. I've tried but I get the same or a similar result. See its
> right when the WARNING is issued but wrong two lines down.
> *
> manager.xml*
> 
>   privileged="true" antiResourceLocking="false"
> antiJARLocking="false">
> 
>
> *catalinia.out*
> * *Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig
> checkResources
> INFO: Undeploying context [/manager]
> Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager
> inside
> the host appBase has been specified, and will be ignored
> Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext
> resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Document base
> /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a
> readable directory
>at
>
> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
>at
>
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048)
>at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
>at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
>at
>
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
>at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
>at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274)
>at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
>at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>at
>
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
>at java.lang.Thread.run(Thread.java:619)
> Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error in resourceStart()
> Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error getConfigured
> Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/manager] startup failed due to previous errors
> Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext stop
> INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[
> cashier.westest.myriadpayments.com].[/manager] has not been started
> cat manager.xml*
> *
>
>
> On Mon, Aug 24, 2009 at 5:13 PM, Jonathan Mast
> wrote:
>
> > Try placing the literal path to the manager in there instead of the
> > ${catalina.home} variable.
> >
> > On Mon, Aug 24, 2009 at 11:09 AM, Wesley Acheson
> > wrote:
> >
> > > Hi,
> > >
> > > I'm using the following configuration.
> > > *VERSION*: Tomcat 6.0.20*
> > > OS*: Fedora core 9
> > > *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1
> SMP
> > > Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux
> > > *install path*: /home/servers/apache-tomcat-6.0.20
> > >
> > > On *another* machine (windows and my desktop). I'm running Apache HTTP
> > > which
> > > is connected via AJP. I don't think thats relevant to my query but you
> > seem
> > > to want all the details one can give.
> > >
> > > Basically my problem is I have added hosts to the server as follows in
> > > server.xml (please note I've removed comments for brevity and
> everything
> > > before service.)
> > >
> > >  
> > >
> > > > >   connectionTimeout="2"
> > >   redirectPort="8543" />
> > >
> > >
> > >
> > >
> > >
> > >   > > resourceName="UserDatabase"/>
> > >
> > >  
> > >   > >unpackWARs="true" autoDeploy="true"
> > >xmlValidation="false" xmlNamespaceAware="false">
> > >  
> > >   > >appbase="/home/servers/applications.westest"
> > >unpackWARs="true" autoDeploy="true"
> > >xmlValidation="false" xmlNamespaceAware="false">
> > >  
> > >   > >appbase="/home/servers/cashie

Re: Virtual Hosts and manager application.

2009-08-24 Thread Wesley Acheson
Thanks Jonathan. I've tried but I get the same or a similar result. See its
right when the WARNING is issued but wrong two lines down.
*
manager.xml*




*catalinia.out*
* *Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig
checkResources
INFO: Undeploying context [/manager]
Aug 24, 2009 5:17:25 PM org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager inside
the host appBase has been specified, and will be ignored
Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
/home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a
readable directory
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/manager] startup failed due to previous errors
Aug 24, 2009 5:17:25 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[
cashier.westest.myriadpayments.com].[/manager] has not been started
cat manager.xml*
*


On Mon, Aug 24, 2009 at 5:13 PM, Jonathan Mast
wrote:

> Try placing the literal path to the manager in there instead of the
> ${catalina.home} variable.
>
> On Mon, Aug 24, 2009 at 11:09 AM, Wesley Acheson
> wrote:
>
> > Hi,
> >
> > I'm using the following configuration.
> > *VERSION*: Tomcat 6.0.20*
> > OS*: Fedora core 9
> > *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1 SMP
> > Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux
> > *install path*: /home/servers/apache-tomcat-6.0.20
> >
> > On *another* machine (windows and my desktop). I'm running Apache HTTP
> > which
> > is connected via AJP. I don't think thats relevant to my query but you
> seem
> > to want all the details one can give.
> >
> > Basically my problem is I have added hosts to the server as follows in
> > server.xml (please note I've removed comments for brevity and everything
> > before service.)
> >
> >  
> >
> > >   connectionTimeout="2"
> >   redirectPort="8543" />
> >
> >
> >
> >
> >
> >   > resourceName="UserDatabase"/>
> >
> >  
> >   >unpackWARs="true" autoDeploy="true"
> >xmlValidation="false" xmlNamespaceAware="false">
> >  
> >   >appbase="/home/servers/applications.westest"
> >unpackWARs="true" autoDeploy="true"
> >xmlValidation="false" xmlNamespaceAware="false">
> >  
> >   >appbase="/home/servers/cashier.westest"
> >unpackWARs="true" autoDeploy="true"
> >xmlValidation="false" xmlNamespaceAware="false">
> >  
> >   >appbase="/home/servers/communication.westest"
> >unpackWARs="true" autoDeploy="true"
> >xmlValidation="false" xmlNamespaceAware="false">
> >  
> >
> >  
> >
> > Now to try to add the manager application to each domain following the
> > instructions found at
> > http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html i've added a
> > manager.xml to each of my hosts. For example
> > /home/servers/apache-tomcat-6.0.20/conf/Catalina/
> > cashier.westest.

Re: Virtual Hosts and manager application.

2009-08-24 Thread Jonathan Mast
Try placing the literal path to the manager in there instead of the
${catalina.home} variable.

On Mon, Aug 24, 2009 at 11:09 AM, Wesley Acheson
wrote:

> Hi,
>
> I'm using the following configuration.
> *VERSION*: Tomcat 6.0.20*
> OS*: Fedora core 9
> *uname -a*: Linux attacker.myriad.local 2.6.27.25-78.2.56.fc9.i686 #1 SMP
> Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux
> *install path*: /home/servers/apache-tomcat-6.0.20
>
> On *another* machine (windows and my desktop). I'm running Apache HTTP
> which
> is connected via AJP. I don't think thats relevant to my query but you seem
> to want all the details one can give.
>
> Basically my problem is I have added hosts to the server as follows in
> server.xml (please note I've removed comments for brevity and everything
> before service.)
>
>  
>
>   connectionTimeout="2"
>   redirectPort="8543" />
>
>
>
>
>
>   resourceName="UserDatabase"/>
>
>  
>  unpackWARs="true" autoDeploy="true"
>xmlValidation="false" xmlNamespaceAware="false">
>  
>  appbase="/home/servers/applications.westest"
>unpackWARs="true" autoDeploy="true"
>xmlValidation="false" xmlNamespaceAware="false">
>  
>  appbase="/home/servers/cashier.westest"
>unpackWARs="true" autoDeploy="true"
>xmlValidation="false" xmlNamespaceAware="false">
>  
>  appbase="/home/servers/communication.westest"
>unpackWARs="true" autoDeploy="true"
>xmlValidation="false" xmlNamespaceAware="false">
>  
>
>  
>
> Now to try to add the manager application to each domain following the
> instructions found at
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html i've added a
> manager.xml to each of my hosts. For example
> /home/servers/apache-tomcat-6.0.20/conf/Catalina/
> cashier.westest.example.com/manager.xml the contents of this file are as
> follows.
>
> 
>  privileged="true" antiResourceLocking="false"
> antiJARLocking="false">
> 
>
> However whenever I alter this file (or restart) I get the following in
> catalina.out
>
> Aug 24, 2009 5:04:14 PM org.apache.catalina.startup.HostConfig
> checkResources
> INFO: Undeploying context [/manager]
> Aug 24, 2009 5:04:14 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> WARNING: A docBase /home/servers/apache-tomcat-6.0.20/webapps/manager
> inside
> the host appBase has been specified, and will be ignored
> Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext
> resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Document base
> /home/servers/apache-tomcat-6.0.20/./manager does not exist or is not a
> readable directory
>at
>
> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
>at
>
> org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048)
>at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
>at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
>at
>
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
>at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
>at
> org.apache.catalina.startup.HostConfig.check(HostConfig.java:1274)
>at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)
>at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>at
>
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
>at java.lang.Thread.run(Thread.java:619)
> Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error in resourceStart()
> Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error getConfigured
> Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/manager] startup failed due to previous errors
> Aug 24, 2009 5:04:14 PM org.apache.catalina.core.StandardContext stop
> INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[
> cashier.westest.example.com].[/manager] has not been started
>
> The path in this f

Re: virtual hosts for chrooted Tomcat

2009-08-03 Thread Ron Van den Branden

Hi,

Juha Laiho schreef:

No, chrooting really does limit filesystem access to directories
to within a specified directory tree. Whatever you want to access
from a chrooted process must reside within that same chroot restriction.

  

Ok, this confirms my supposition, thanks.


Note though, that these (chrooting) questions have little or no relation
with Tomcat as is, but would be more properly handled in an OS-related
forum.
  
I fully agree with you; hoping for an answer I set out by knocking on a 
familiar door in that big world. Thanks ever so much for your elaborate 
and kind help.


Kind regards,

Ron

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



Re: virtual hosts for chrooted Tomcat

2009-08-03 Thread Juha Laiho
Ron Van den Branden wrote:
> Hi all,
> 
> I'm preparing for deploying Tomcat based web applications on a dedicated
> server (finally!). I have experience with Tomcat webapps on my local
> Windows machine, but am making myself familiar with a real-life
> situation on a Ubuntu Linux server.
> 
> From what I've read, chrooting Tomcat seems a sensible security measure,
> documented in detail in O'Reilly's "Tomcat: the Definitive Guide"
> (). Before I start
> messing around, however, I would like to clarify some concepts.
> 
> If I
>1. setup Tomcat for virtual hosts, serving webapps from another
> directory than %TOMCAT_HOME%/webapps, say
> /var/www/virtualhosts/[virtualhost]/
>2. install Tomcat in its chroot jail at /home/chroot/tomcat
> ...will Tomcat be able to serve these webapps?

No, chrooting really does limit filesystem access to directories
to within a specified directory tree. Whatever you want to access
from a chrooted process must reside within that same chroot restriction.

You might be able to set up chrooting so that Tomcat is able to access
all virtual hosts, and so that each sftp/ssh update account only has
access to the specific virtualhost directory tree, but for this case
the Tomcat chroot point must be a common point above all the virtual
hosts.

So, if you f.ex. have a directory structure
/a/b/tomcat
/a/b/vhost1
/a/b/vhost2
... then, if your Tomcat process is chrooted to /a/b/tomcat, it will
not be able to access any directory which is not below the /a/b/tomcat
directory. This is the whole and sole point of chrooting: the "root"
directory accessible to a process is changed to something else than the
real root directory of the underlying filesystem.

Instead, if you chroot tomcat to /a/b, then it will be able to access
anything wihtin /a/b, including all three abovementioned directories.
Also, when you run a process chrooted, copies of all files needed by
the process must exist within the chrooted environment (f.ex. all JDK
files needed by Tomcat).

Note though, that these (chrooting) questions have little or no relation
with Tomcat as is, but would be more properly handled in an OS-related
forum.
-- 
..Juha

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



RE: virtual hosts and tomcat-users.xml

2009-04-28 Thread Martin Gainty

the webapplication web.xml can reference previously defined Resources 
(UserDatabase) as here
  

  Link to the UserDatabase instance from which we request lists of
  defined role names.  Typically, this will be connected to the global
  user database with a ResourceLink element in server.xml or the context
  configuration file for the Manager web application.

users

  org.apache.catalina.UserDatabase

  

Here is the applicable UserDatabase which can be configured in 
$TOMCAT_HOME/conf/server.xml
 
//pathname can point to any user defined xml


  
  


HTH
Martin 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de 
déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.






> Date: Tue, 28 Apr 2009 15:10:02 -0700
> Subject: virtual hosts and tomcat-users.xml
> From: cheshira...@gmail.com
> To: users@tomcat.apache.org
> 
> I am setting up a handful of virtual hosts on a server, and I have the
> manager app configured as per the docs. How do I configure the
> security for the manager app such that each virtual host has its own
> tomcat-users.xml though, so that the credentials of one virtual host
> can't be used log on to the manager of another?
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009

Re: Virtual Hosts

2009-04-15 Thread David Fisher

Hi Charles,


I have multiple domains hosted, and I name each as
Aliases in the Host in server.xml.


If you only have one  element, aliases are unnecessary.  You  
only need  elements when multiple s are configured and  
you want Tomcat to route more than one domain to them.


Exactly. We started with Tomcat 3. We have multiple Hosts - localhost  
with internal webapps for monitoring our main webapps and performing  
internal services. We keep a large cache and have a number of jars in  
shared/lib.


We are currently re-architecting so that we can go to Tomcat 6 where  
the games that we have been playing are out of bounds.


We'll have one stack and control access with a Filter and/or Valve.  
This way we have everything in one webapps and it will be a single  
Context that we can put everything into a war - deploy to the Cloud.


I would hope that configuring such unneeded  elements doesn't  
add processing time doing any comparisons, but I haven't looked at  
the code to verify that.


We can make apache do this work for us in front. I've been lurking on  
this list for some time. In a few weeks we will build our first  
version of this and I am confident that should we encounter trouble I  
can get advice from the good people like you here on the Tomcat users  
list.


Best Regards,
Dave

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



RE: Virtual Hosts

2009-04-15 Thread Caldarale, Charles R
> From: David Fisher [mailto:dfis...@jmlafferty.com]
> Subject: Re: Virtual Hosts
> 
> I have multiple domains hosted, and I name each as
> Aliases in the Host in server.xml.

If you only have one  element, aliases are unnecessary.  You only need 
 elements when multiple s are configured and you want Tomcat to 
route more than one domain to them.

I would hope that configuring such unneeded  elements doesn't add 
processing time doing any comparisons, but I haven't looked at the code to 
verify that.

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

2009-04-15 Thread David Fisher
Can anybody offer any guidance or advice on how I can set up some  
virtual

hosts for my application that has multiple skins.

I want to be able to go to http://flavour1 instead of having to  
type in
http://longhostname/service/program.jsp?skins=flavour1, and similar  
for

flavour2, flavour3, etc..

All the documentation seems to point to virtual directories, and  
when I have

tried to use the syntax detailed here
http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html
http://gandhim.wordpress.com/2008/01/31/tomcat-55-virtual-directory/
http://www.experts-exchange.com/Web/Web_Servers/Apache/ 
Q_21242062.html


Tomcat tries to open a directory called /service/program.jsp? 
skins=flavour1/


How do I phrase the context syntax correctly?

MTIA

Rob



Write a Servlet Filter that parses HttpServletRequest.getServerName()
and performs the same action that whatever handles the  
"skins=flavour1"

parameter does.

In server.xml set the Engine attribute defaultHost to the single host
that will handle your application.

(This assumes that you know what you're doing re: DNS)


I use this technique and it works in Tomcat 5.5. I have multiple  
domains hosted, and I name each as Aliases in the Host in server.xml.


This works unless the OP also needs to make https connections. In that  
case, all of the virtual hosts will need to be in the same main domain  
and a wildcard certificate will be required.


*.domain.com

vs.

www.domain1.com
www.domain2.com

If you must use https (which I do) and to have multiple domains then I  
have to choose which domain has the correct certificate and the others  
will not match. That wasn't too awful until Firefox 3. It is a pain.


There is no known (at least to me) solution to this except for putting  
Apache in front of Tomcat and handle the certificates and virtual host  
there.


Then use Filter technique to choose the appropriate skin.

I hope my remarks anticipate the next question from the OP, otherwise  
I'm sorry if this a thread "hijack"


Regards,
Dave





p

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




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



Re: Virtual Hosts

2009-04-15 Thread Pid
gisrob wrote:
> Can anybody offer any guidance or advice on how I can set up some virtual
> hosts for my application that has multiple skins.
> 
> I want to be able to go to http://flavour1 instead of having to type in
> http://longhostname/service/program.jsp?skins=flavour1, and similar for
> flavour2, flavour3, etc..
> 
> All the documentation seems to point to virtual directories, and when I have
> tried to use the syntax detailed here
> http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html
> http://gandhim.wordpress.com/2008/01/31/tomcat-55-virtual-directory/
> http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21242062.html
> 
> Tomcat tries to open a directory called /service/program.jsp?skins=flavour1/
> 
> How do I phrase the context syntax correctly?
> 
> MTIA
> 
> Rob
> 

Write a Servlet Filter that parses HttpServletRequest.getServerName()
and performs the same action that whatever handles the "skins=flavour1"
parameter does.

In server.xml set the Engine attribute defaultHost to the single host
that will handle your application.

(This assumes that you know what you're doing re: DNS)

p

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



Re: Virtual Hosts

2009-04-15 Thread Hassan Schroeder
On Wed, Apr 15, 2009 at 7:44 AM, gisrob  wrote:
>
> Can anybody offer any guidance or advice on how I can set up some virtual
> hosts for my application that has multiple skins.
>
> I want to be able to go to http://flavour1 instead of having to type in
> http://longhostname/service/program.jsp?skins=flavour1, and similar for
> flavour2, flavour3, etc..
>
> All the documentation seems to point to virtual directories, and when I have
> tried to use the syntax detailed here
> http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html

If you followed the above -- showing the relevant part of server.xml
would probably be helpful -- and entered a url like

http://flavour1.example.com/

in your browser,

> Tomcat tries to open a directory called /service/program.jsp?skins=flavour1/

erm, well, that sounds highly unlikely.

> How do I phrase the context syntax correctly?

No idea what that means. Each virtual host will have a ROOT context;
what that contains is up to you.

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

2009-03-30 Thread André Warnier

Bart Ophelders wrote:

Sorry if I was somewhat unclear.

What I would like to accomplish is the following:

If someone types start.test.example.com it should refer to a certain page.
If someone types hello.test.example.com it should refer to the same page.
I would like the user to be able to type anything before the test.example.com and 
tomcat still accepts it and refers to the correct page 
(.test.example.com)


The first thing you need to understand is that there are 2 steps :
1) when the user types "xxx.test.example.com", /his/ DNS resolver needs 
to resolve that to the IP address of your server.  Otherwise, your 
Tomcat will never even receive and see those requests.
2) /then/ you can start thinking about how Tomcat should process the 
requests that it receives.

Really make sure you understand (1) before you start with (2).

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



Re: virtual hosts

2009-03-30 Thread Yassine
so you mean in the same machine you will be hosting different domains

test1.example.com
test2.example.com
test3.example.com
...??

and you want to avoid having a conflict when someone is accessing
other domains example test1, test2, ... ?


actually if this is your case there is no problem at all, if you
create a domain for each of your known
domains/subdomain (test1.example.com,tes2.example.com,...) they will
be considered for requests
that targets them
so for example requests for test1.example.com --> proper domain
defined in server.xml and for anything
else undefined "*"
the defaultHost would be handling the requests

Yassine

On Mon, Mar 30, 2009 at 2:17 PM, Bart Ophelders
 wrote:
>
> I 'm trying to set up an OpenID provider for testing purposes.
> Since we only have one machine, there are more applications running, and 
> maybe there could be some conflicts. I'm not sure.
>
> -Bart
>
>> Date: Mon, 30 Mar 2009 14:07:38 +0200
>> Subject: Re: virtual hosts
>> From: elas...@users.sourceforge.net
>> To: users@tomcat.apache.org
>>
>> Hi Bart,
>>
>> I'm not aware of any other way to do it.
>> I only wanted to know whats wrong with setting that sub domain
>> (test.example.com) as the default host?
>> are we missing  some information that needs to be taken care of?
>>
>>
>> Yassine
>>
>>
>> On Mon, Mar 30, 2009 at 1:59 PM, Bart Ophelders
>>  wrote:
>> >
>> > I don't like to put it as default, but if there is no other way..
>> >
>> > Thanks!
>> >
>> > -Bart
>> >
>> >> Date: Mon, 30 Mar 2009 12:39:42 +0100
>> >> From: p...@pidster.com
>> >> To: users@tomcat.apache.org
>> >> Subject: Re: virtual hosts
>> >>
>> >> Bart Ophelders wrote:
>> >> > Thanks for the quick response!
>> >> >
>> >> > Isn't it possible to do something like this:
>> >> >
>> >> > 
>> >>
>> >> Not quite like that.
>> >>
>> >> 
>> >>
>> >>   
>> >>
>> >> 
>> >>
>> >>
>> >> Will result in all traffic that arrives at IPs specified in your
>> >> Connectors, but that does not conform to another Host/Alias definition
>> >> being delivered to the webapps of the defaultHost.
>> >>
>> >> p
>> >>
>> >>
>> >>
>> >> > -Bart Ophelders
>> >> >
>> >> >> Date: Mon, 30 Mar 2009 12:36:09 +0200
>> >> >> Subject: Re: virtual hosts
>> >> >> From: elas...@users.sourceforge.net
>> >> >> To: users@tomcat.apache.org
>> >> >>
>> >> >> Hi,
>> >> >>
>> >> >> i hope i undertstood what you mean if so, look for the loadbalancer
>> >> >> application shipped with tomcat which does something similar.
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
>> >> >>  wrote:
>> >> >>> Hi,
>> >> >>>
>> >> >>> I would like to know if it is possible to let tomcat redirect ANY url 
>> >> >>> ending with for example test.example.com to a certain webapp.
>> >> >>>
>> >> >>> Thanks in advance!
>> >> >>>
>> >> >>> -Bart Ophelders
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> --
>> >> >> Yassine Elassad
>> >> >> Bonn, Germany.
>> >> >> Fon : +49 228 97629355
>> >> >> Mobile : +49 157 74519666
>> >> >>
>> >> >> PEACE :
>> >> >> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
>> >> >>
>> >> >> -
>> >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >> >> For additional commands, e-mail: users-h...@tomcat.apache.org
>> >> >>
>> >> >
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >> For additional commands, e-mail: users-h...@tomcat.apache.org
>> >>
>> >
>>
>>
>>
>> --
>> --
>> Yassine Elassad
>> Bonn, Germany.
>> Fon : +49 228 97629355
>> Mobile : +49 157 74519666
>>
>> PEACE :
>> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>



-- 
--
Yassine Elassad
Bonn, Germany.
Fon : +49 228 97629355
Mobile : +49 157 74519666

PEACE :
( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.

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



RE: virtual hosts

2009-03-30 Thread Bart Ophelders

I 'm trying to set up an OpenID provider for testing purposes.
Since we only have one machine, there are more applications running, and maybe 
there could be some conflicts. I'm not sure.

-Bart

> Date: Mon, 30 Mar 2009 14:07:38 +0200
> Subject: Re: virtual hosts
> From: elas...@users.sourceforge.net
> To: users@tomcat.apache.org
> 
> Hi Bart,
> 
> I'm not aware of any other way to do it.
> I only wanted to know whats wrong with setting that sub domain
> (test.example.com) as the default host?
> are we missing  some information that needs to be taken care of?
> 
> 
> Yassine
> 
> 
> On Mon, Mar 30, 2009 at 1:59 PM, Bart Ophelders
>  wrote:
> >
> > I don't like to put it as default, but if there is no other way..
> >
> > Thanks!
> >
> > -Bart
> >
> >> Date: Mon, 30 Mar 2009 12:39:42 +0100
> >> From: p...@pidster.com
> >> To: users@tomcat.apache.org
> >> Subject: Re: virtual hosts
> >>
> >> Bart Ophelders wrote:
> >> > Thanks for the quick response!
> >> >
> >> > Isn't it possible to do something like this:
> >> >
> >> > 
> >>
> >> Not quite like that.
> >>
> >> 
> >>
> >>   
> >>
> >> 
> >>
> >>
> >> Will result in all traffic that arrives at IPs specified in your
> >> Connectors, but that does not conform to another Host/Alias definition
> >> being delivered to the webapps of the defaultHost.
> >>
> >> p
> >>
> >>
> >>
> >> > -Bart Ophelders
> >> >
> >> >> Date: Mon, 30 Mar 2009 12:36:09 +0200
> >> >> Subject: Re: virtual hosts
> >> >> From: elas...@users.sourceforge.net
> >> >> To: users@tomcat.apache.org
> >> >>
> >> >> Hi,
> >> >>
> >> >> i hope i undertstood what you mean if so, look for the loadbalancer
> >> >> application shipped with tomcat which does something similar.
> >> >>
> >> >>
> >> >>
> >> >> On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
> >> >>  wrote:
> >> >>> Hi,
> >> >>>
> >> >>> I would like to know if it is possible to let tomcat redirect ANY url 
> >> >>> ending with for example test.example.com to a certain webapp.
> >> >>>
> >> >>> Thanks in advance!
> >> >>>
> >> >>> -Bart Ophelders
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >> --
> >> >> --
> >> >> Yassine Elassad
> >> >> Bonn, Germany.
> >> >> Fon : +49 228 97629355
> >> >> Mobile : +49 157 74519666
> >> >>
> >> >> PEACE :
> >> >> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >> >>
> >> >
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >
> 
> 
> 
> -- 
> --
> Yassine Elassad
> Bonn, Germany.
> Fon : +49 228 97629355
> Mobile : +49 157 74519666
> 
> PEACE :
> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


Re: virtual hosts

2009-03-30 Thread Yassine
Hi Bart,

I'm not aware of any other way to do it.
I only wanted to know whats wrong with setting that sub domain
(test.example.com) as the default host?
are we missing  some information that needs to be taken care of?


Yassine


On Mon, Mar 30, 2009 at 1:59 PM, Bart Ophelders
 wrote:
>
> I don't like to put it as default, but if there is no other way..
>
> Thanks!
>
> -Bart
>
>> Date: Mon, 30 Mar 2009 12:39:42 +0100
>> From: p...@pidster.com
>> To: users@tomcat.apache.org
>> Subject: Re: virtual hosts
>>
>> Bart Ophelders wrote:
>> > Thanks for the quick response!
>> >
>> > Isn't it possible to do something like this:
>> >
>> > 
>>
>> Not quite like that.
>>
>> 
>>
>>   
>>
>> 
>>
>>
>> Will result in all traffic that arrives at IPs specified in your
>> Connectors, but that does not conform to another Host/Alias definition
>> being delivered to the webapps of the defaultHost.
>>
>> p
>>
>>
>>
>> > -Bart Ophelders
>> >
>> >> Date: Mon, 30 Mar 2009 12:36:09 +0200
>> >> Subject: Re: virtual hosts
>> >> From: elas...@users.sourceforge.net
>> >> To: users@tomcat.apache.org
>> >>
>> >> Hi,
>> >>
>> >> i hope i undertstood what you mean if so, look for the loadbalancer
>> >> application shipped with tomcat which does something similar.
>> >>
>> >>
>> >>
>> >> On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
>> >>  wrote:
>> >>> Hi,
>> >>>
>> >>> I would like to know if it is possible to let tomcat redirect ANY url 
>> >>> ending with for example test.example.com to a certain webapp.
>> >>>
>> >>> Thanks in advance!
>> >>>
>> >>> -Bart Ophelders
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> --
>> >> Yassine Elassad
>> >> Bonn, Germany.
>> >> Fon : +49 228 97629355
>> >> Mobile : +49 157 74519666
>> >>
>> >> PEACE :
>> >> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> >> For additional commands, e-mail: users-h...@tomcat.apache.org
>> >>
>> >
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>



-- 
--
Yassine Elassad
Bonn, Germany.
Fon : +49 228 97629355
Mobile : +49 157 74519666

PEACE :
( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.

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



RE: virtual hosts

2009-03-30 Thread Bart Ophelders

I don't like to put it as default, but if there is no other way..

Thanks!

-Bart

> Date: Mon, 30 Mar 2009 12:39:42 +0100
> From: p...@pidster.com
> To: users@tomcat.apache.org
> Subject: Re: virtual hosts
> 
> Bart Ophelders wrote:
> > Thanks for the quick response!
> > 
> > Isn't it possible to do something like this:
> > 
> > 
> 
> Not quite like that.
> 
> 
> 
>   
> 
> 
> 
> 
> Will result in all traffic that arrives at IPs specified in your
> Connectors, but that does not conform to another Host/Alias definition
> being delivered to the webapps of the defaultHost.
> 
> p
> 
> 
> 
> > -Bart Ophelders
> > 
> >> Date: Mon, 30 Mar 2009 12:36:09 +0200
> >> Subject: Re: virtual hosts
> >> From: elas...@users.sourceforge.net
> >> To: users@tomcat.apache.org
> >>
> >> Hi,
> >>
> >> i hope i undertstood what you mean if so, look for the loadbalancer
> >> application shipped with tomcat which does something similar.
> >>
> >>
> >>
> >> On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
> >>  wrote:
> >>> Hi,
> >>>
> >>> I would like to know if it is possible to let tomcat redirect ANY url 
> >>> ending with for example test.example.com to a certain webapp.
> >>>
> >>> Thanks in advance!
> >>>
> >>> -Bart Ophelders
> >>>
> >>>
> >>
> >>
> >> -- 
> >> --
> >> Yassine Elassad
> >> Bonn, Germany.
> >> Fon : +49 228 97629355
> >> Mobile : +49 157 74519666
> >>
> >> PEACE :
> >> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> > 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


RE: virtual hosts

2009-03-30 Thread Bart Ophelders

Sorry if I was somewhat unclear.

What I would like to accomplish is the following:

If someone types start.test.example.com it should refer to a certain page.
If someone types hello.test.example.com it should refer to the same page.
I would like the user to be able to type anything before the test.example.com 
and tomcat still accepts it and refers to the correct page 
(.test.example.com)

I know I can define multiple hosts, but it is not possible to know all the 
possibilities.
So I was hoping the '*' wildcard would work (put "*.test.example.com" as host 
name in server.xml), but it doesn't.

Tomcat 6
Java 1.6
CentOS 5.2

Thanks,

-Bart



> Date: Mon, 30 Mar 2009 12:04:56 +0100
> From: p...@pidster.com
> To: users@tomcat.apache.org
> Subject: Re: virtual hosts
> 
> Bart Ophelders wrote:
> > Hi,
> > 
> > I would like to know if it is possible to let tomcat redirect ANY url 
> > ending with for example test.example.com to a certain webapp.
> 
> It's not clear what you mean.  URLs normally *start* with a domain,
> rather than end with it.
> 
> If you mean can I assign "*.domain.com" to a specific webapp, the answer
> is yes - by defining the default host for a service.
> 
> Perhaps you can elaborate?
> 
> p
> 
> 
> P.S. Java version, Tomcast version, OS etc?
> 
> 
> 
> 
> > Thanks in advance!
> > 
> > -Bart Ophelders
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


Re: virtual hosts

2009-03-30 Thread Pid
Bart Ophelders wrote:
> Thanks for the quick response!
> 
> Isn't it possible to do something like this:
> 
> 

Not quite like that.



  




Will result in all traffic that arrives at IPs specified in your
Connectors, but that does not conform to another Host/Alias definition
being delivered to the webapps of the defaultHost.

p



> -Bart Ophelders
> 
>> Date: Mon, 30 Mar 2009 12:36:09 +0200
>> Subject: Re: virtual hosts
>> From: elas...@users.sourceforge.net
>> To: users@tomcat.apache.org
>>
>> Hi,
>>
>> i hope i undertstood what you mean if so, look for the loadbalancer
>> application shipped with tomcat which does something similar.
>>
>>
>>
>> On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
>>  wrote:
>>> Hi,
>>>
>>> I would like to know if it is possible to let tomcat redirect ANY url 
>>> ending with for example test.example.com to a certain webapp.
>>>
>>> Thanks in advance!
>>>
>>> -Bart Ophelders
>>>
>>>
>>
>>
>> -- 
>> --
>> Yassine Elassad
>> Bonn, Germany.
>> Fon : +49 228 97629355
>> Mobile : +49 157 74519666
>>
>> PEACE :
>> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> 


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



RE: virtual hosts

2009-03-30 Thread Bart Ophelders

Thanks for the quick response!

Isn't it possible to do something like this:



-Bart Ophelders

> Date: Mon, 30 Mar 2009 12:36:09 +0200
> Subject: Re: virtual hosts
> From: elas...@users.sourceforge.net
> To: users@tomcat.apache.org
> 
> Hi,
> 
> i hope i undertstood what you mean if so, look for the loadbalancer
> application shipped with tomcat which does something similar.
> 
> 
> 
> On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
>  wrote:
> >
> > Hi,
> >
> > I would like to know if it is possible to let tomcat redirect ANY url 
> > ending with for example test.example.com to a certain webapp.
> >
> > Thanks in advance!
> >
> > -Bart Ophelders
> >
> >
> 
> 
> 
> -- 
> --
> Yassine Elassad
> Bonn, Germany.
> Fon : +49 228 97629355
> Mobile : +49 157 74519666
> 
> PEACE :
> ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


Re: virtual hosts

2009-03-30 Thread Pid
Bart Ophelders wrote:
> Hi,
> 
> I would like to know if it is possible to let tomcat redirect ANY url ending 
> with for example test.example.com to a certain webapp.

It's not clear what you mean.  URLs normally *start* with a domain,
rather than end with it.

If you mean can I assign "*.domain.com" to a specific webapp, the answer
is yes - by defining the default host for a service.

Perhaps you can elaborate?

p


P.S. Java version, Tomcast version, OS etc?




> Thanks in advance!
> 
> -Bart Ophelders
> 
> 


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



Re: virtual hosts

2009-03-30 Thread Yassine
Hi,

i hope i undertstood what you mean if so, look for the loadbalancer
application shipped with tomcat which does something similar.



On Mon, Mar 30, 2009 at 12:29 PM, Bart Ophelders
 wrote:
>
> Hi,
>
> I would like to know if it is possible to let tomcat redirect ANY url ending 
> with for example test.example.com to a certain webapp.
>
> Thanks in advance!
>
> -Bart Ophelders
>
>



-- 
--
Yassine Elassad
Bonn, Germany.
Fon : +49 228 97629355
Mobile : +49 157 74519666

PEACE :
( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors.

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



Re: virtual hosts

2009-01-28 Thread Pid
Josh Pollara wrote:
> I am making a transition from apache http -> tomcat. DNS is all configured 
> correctly etc. example.com and *.example.com point to the same place.
> 
> I'm quite certain that tomcat does not support wildcard virtual hosts, I just 
> wanted to confirm with someone who was positive.

It won't support multiple virtual Hosts, but you can set one webapp to
be the default Host - it will then catch all requests that fail to match
another Host.

Check the Engine config element.

p


> -Original Message-
> From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
> Sent: Wed 1/28/2009 4:50 AM
> To: Tomcat Users List
> Subject: Re: virtual hosts
>  
> Hi,
> 
> Is your dns properly configured?
> And what does your environment look like?
> 
> Regards,
> 
> Serge Fonville
> 
> On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
> wrote:
> 
>> Does Tomcat support wildcard virtual hosts?
>>
>> I'm looking to do something like this:
>>
>>  >*.example.com
>>  
>>
>> This does not work though. Any suggestions?
>>
>> -josh
>>
>>
> 
> 


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



Re: virtual hosts

2009-01-28 Thread Serge Fonville
Alternatively you may be able to create a wildcard CNAME in dns
Hope this helps.

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 2:25 PM, Serge Fonville wrote:

> On Wed, Jan 28, 2009 at 2:16 PM, Serge Fonville 
>  wrote:
>
>> I tried it at my dev machine and added an alias to the host section for
>> *.domain.tldevery attempt to access a tomcat host on a resolvable address
>> works.
>>
>
> Sorry, my bad.
> I had only configured a default host.
>
> Probably then the only way to do this would put httpd in front of tomcat.
>
> Regards,
>
> Serge Fonville
>


Re: virtual hosts

2009-01-28 Thread Serge Fonville
On Wed, Jan 28, 2009 at 2:16 PM, Serge Fonville 
 wrote:

> I tried it at my dev machine and added an alias to the host section for
> *.domain.tldevery attempt to access a tomcat host on a resolvable address
> works.
>

Sorry, my bad.
I had only configured a default host.

Probably then the only way to do this would put httpd in front of tomcat.

Regards,

Serge Fonville


RE: virtual hosts

2009-01-28 Thread Josh Pollara
Please paste your config because I just tried this and it does not work for me. 
What tomcat version are you using?


-Original Message-
From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Wed 1/28/2009 5:16 AM
To: Tomcat Users List
Subject: Re: virtual hosts
 
I tried it at my dev machine and added an alias to the host section for
*.domain.tldevery attempt to access a tomcat host on a resolvable address
works.

Hope this helps.

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:53 PM, Josh Pollara
wrote:

> I am making a transition from apache http -> tomcat. DNS is all configured
> correctly etc. example.com and *.example.com point to the same place.
>
> I'm quite certain that tomcat does not support wildcard virtual hosts, I
> just wanted to confirm with someone who was positive.
>
> -Original Message-
> From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
> Sent: Wed 1/28/2009 4:50 AM
> To: Tomcat Users List
> Subject: Re: virtual hosts
>
> Hi,
>
> Is your dns properly configured?
> And what does your environment look like?
>
> Regards,
>
> Serge Fonville
>
> On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
> wrote:
>
> > Does Tomcat support wildcard virtual hosts?
> >
> > I'm looking to do something like this:
> >
> >   >*.example.com
> >  
> >
> > This does not work though. Any suggestions?
> >
> > -josh
> >
> >
>
>



Re: virtual hosts

2009-01-28 Thread Serge Fonville
I tried it at my dev machine and added an alias to the host section for
*.domain.tldevery attempt to access a tomcat host on a resolvable address
works.

Hope this helps.

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:53 PM, Josh Pollara
wrote:

> I am making a transition from apache http -> tomcat. DNS is all configured
> correctly etc. example.com and *.example.com point to the same place.
>
> I'm quite certain that tomcat does not support wildcard virtual hosts, I
> just wanted to confirm with someone who was positive.
>
> -Original Message-
> From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
> Sent: Wed 1/28/2009 4:50 AM
> To: Tomcat Users List
> Subject: Re: virtual hosts
>
> Hi,
>
> Is your dns properly configured?
> And what does your environment look like?
>
> Regards,
>
> Serge Fonville
>
> On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
> wrote:
>
> > Does Tomcat support wildcard virtual hosts?
> >
> > I'm looking to do something like this:
> >
> >   >*.example.com
> >  
> >
> > This does not work though. Any suggestions?
> >
> > -josh
> >
> >
>
>


RE: virtual hosts

2009-01-28 Thread Josh Pollara
I am making a transition from apache http -> tomcat. DNS is all configured 
correctly etc. example.com and *.example.com point to the same place.

I'm quite certain that tomcat does not support wildcard virtual hosts, I just 
wanted to confirm with someone who was positive.

-Original Message-
From: Serge Fonville [mailto:serge.fonvi...@gmail.com]
Sent: Wed 1/28/2009 4:50 AM
To: Tomcat Users List
Subject: Re: virtual hosts
 
Hi,

Is your dns properly configured?
And what does your environment look like?

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
wrote:

> Does Tomcat support wildcard virtual hosts?
>
> I'm looking to do something like this:
>
>  *.example.com
>  
>
> This does not work though. Any suggestions?
>
> -josh
>
>



Re: virtual hosts

2009-01-28 Thread Serge Fonville
Hi,

Is your dns properly configured?
And what does your environment look like?

Regards,

Serge Fonville

On Wed, Jan 28, 2009 at 1:28 PM, Josh Pollara
wrote:

> Does Tomcat support wildcard virtual hosts?
>
> I'm looking to do something like this:
>
>  *.example.com
>  
>
> This does not work though. Any suggestions?
>
> -josh
>
>


RE: Virtual Hosts and 'Hot' Redeployment

2008-07-03 Thread Caldarale, Charles R
> From: Martin Harrigan [mailto:[EMAIL PROTECTED]
> Subject: Virtual Hosts and 'Hot' Redeployment
>
> Any ideas why a redeployed webapp might work from
> http://1.2.3.4/myWebApp but not from
> http://www.otherserver.com?

Your configuration is invalid, so predictable operation is not possible.  To 
fix the config, you first need to give each  a separate, non-overlapping 
appBase.  Then, deploy your myWebApp as ROOT (not myWebApp) in the 
"otherserver" appBase.  If you then want to access the "otherserver" default 
webapp from localhost, create a  element in 
conf/Catalina/localhost/myWebApp.xml with a docBase attribute whose value is 
the "otherserver"'s [appBase]/ROOT directory (or [appBase]/ROOT.war, if 
appropriate).  Note that this is a separate run-time instance of myWebApp - 
there's no way to avoid that.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Virtual Hosts: path="/" without using ROOT folder?

2008-02-27 Thread Lessie Z. Mitch
Ahhh 

And now I hear many software vendors screaming in agony. 

Our packaged ecommerce software came with instructions to work with the bug
- without mentioning it was a bug.

This explains a lot. Thank you. ^.^


~LZM~


-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 10:06 PM
To: Tomcat Users List
Subject: Re: Virtual Hosts: path="/" without using ROOT folder?

Lessie Z. Mitch wrote:
> Why does my original configuration not work anymore? I will keep Mark's
> recommended configuration but would like to know they "why" behind the
> "how". Helps me understand when launching other sites on this server
(there
> will be another 4 virtual hosts, each serving up 3 or 4 webapps).

The 2.5 servlet spec relaxed the rules on what could be deployed as a
webapp to include a dir with just static files and/or JSPs. To support
this, Tomcat deploys any dir under a host's appBase as a webapp. This was
ported back to 5.5 since it doesn't break the spec and was viewed as useful.

Setting appBase==docBase was invalid and never supported but, as the
side-effect of a bug, actually worked. A number of how-to guides suggested
this config and people started to use it. When the bug was fixed the
invalid configuration stopped working. This fix combined with the
auto-deployment of any dir in an appBase created all sorts of weirdness.

Hope this explains some of the background.

Mark

 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 


-
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 Hosts: path="/" without using ROOT folder?

2008-02-27 Thread Mark Thomas

Lessie Z. Mitch wrote:

/tomcat_home/conf/server.xml

name="domain1.com" 
   appBase="/home/web/domain1.com/webapps" ~~~  no directory after

webapps
   unpackWARs="true" 
   autoDeploy="true">

 


This now looks good. Note that *any* directory or war under
/home/web/domain1.com/webapps is going to get deployed as a webapp.


So now I move the contexts out of the server.xml into this recommended
configuration. Keep in mind, I am STILL working with war files that extract
to directories.


/tomcat_home/conf/server.xml

name="domain1.com" 
   appBase="/home/web/domain1.com/webapps/domain1"
   unpackWARs="true" 
   autoDeploy="true">

 


Note setting appBase==docBase is going to create a world of pain. Your
change above should have fixed this.


Context files for domain1 (will only do domain1 as the other two are
mimicked)
/tomcat_home/conf/Catalina/domain1.com/ROOT.xml  ~~ this is so that when
type http://domain1.com/ site will appear




Also looks OK.


Physical directory
Home
\__web
   \__domain1.com
  \__domain1   ~~~ from war located in webapps, moved it out as war
extracts into webapps


I assume this is now
Home
\__web
   \__domain1.com
  \__domain1   ~~~ ROOT webapp for domain1.com
  \__webapps   ~~~ Other war files

Note that domain1 could be a dir or a war

This is now working on my server. Although not exactly what I wanted... 
1-had to move extracted war directories OUT of webapps

2-ROOT context in /tomcat_home/conf/Catalina/domain1 directory (using that
"ROOT" name)


This should be fixed now.


Why does my original configuration not work anymore? I will keep Mark's
recommended configuration but would like to know they "why" behind the
"how". Helps me understand when launching other sites on this server (there
will be another 4 virtual hosts, each serving up 3 or 4 webapps).


The 2.5 servlet spec relaxed the rules on what could be deployed as a
webapp to include a dir with just static files and/or JSPs. To support
this, Tomcat deploys any dir under a host's appBase as a webapp. This was
ported back to 5.5 since it doesn't break the spec and was viewed as useful.

Setting appBase==docBase was invalid and never supported but, as the
side-effect of a bug, actually worked. A number of how-to guides suggested
this config and people started to use it. When the bug was fixed the
invalid configuration stopped working. This fix combined with the
auto-deployment of any dir in an appBase created all sorts of weirdness.

Hope this explains some of the background.

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]



RE: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Lessie Z. Mitch
Omg I must be tired...

Ex-ay on the reply-ay...  (can you tell I'm tired??)

Final configuration:

/tomcat_home/conf/server.xml

 
 


Webapp starts fine, serves fine... rest of previous is okay - just the
server.xml section

~LZM~

-Original Message-
From: Lessie Z. Mitch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 1:33 PM
To: 'Tomcat Users List'
Subject: RE: Virtual Hosts: path="/" without using ROOT folder?

This is going to be long... so bear with me.



My want was to name the context xmls something other than "ROOT". 

In a previous setup I had with TC5.5.16, my contexts were actually in the
server.xml document - which we all know is really a bad thing. I had other
webapps running on the same host so when accessing them will be with a root
domain and then subapps which are explicitly named in the url. We did not
want to use "ROOT" as there are several hosts and "ROOT" gets confusing.

Keep in mind all .war files extract their own directories in each instance
(thus directories being explicit).

Example 3 virtual hosts:
domain1
domain2
domain3

All needing to be separate due to SSL issues, thus had IP structure defined
in Apache (yet another story - will stick to TC configurations)


OLD SETUP 

/tomcat_home/conf/server.xml


 
 
 
 
 
 




 
 
 
 
 
 




 
 
 
 
 
 


Physical Directories:
Home
\__web
   \__domain1
  \__logs
  \__webapps
 \__domain1
 \__wiki1
 \__forum1
   \__domain2
  \__logs
  \__webapps
 \__domain2
 \__wiki2
 \__forum2
   \__domain3
  \__logs
  \__webapps
 \__domain3
 \__wiki3
 \__forum3


I didn't use anything "ROOT" for the server.xml explicitly called out my
contexts and segregated them. I will note that this was a stable
configuration until about the beginning of December08. I don't know what
happened, but my server became unstable, and eventually had a memory
melt-down (we called it a stroke). I had to totally redo the server - from
scratch. 

So now I move the contexts out of the server.xml into this recommended
configuration. Keep in mind, I am STILL working with war files that extract
to directories.


/tomcat_home/conf/server.xml

 
 

 
 

 
 

Context files for domain1 (will only do domain1 as the other two are
mimicked)
/tomcat_home/conf/Catalina/domain1.com/ROOT.xml  ~~ this is so that when
type http://domain1.com/ site will appear


/tomcat_home/conf/Catalina/domain1.com/wiki1.xml  ~~ this is so that when
type http://domain1.com/wiki this sub-site will appear


/tomcat_home/conf/Catalina/domain1.com/form1.xml  ~~ this is so that when
type http://domain1.com/forum this sub-site will appear



Physical directory
Home
\__web
   \__domain1.com
  \__domain1   ~~~ from war located in webapps, moved it out as war
extracts into webapps
  \__wiki  ~~~ from war located in webapps, moved it out as war
extracts into webapps
  \__forum ~~~ from war located in webapps, moved it out as war
extracts into webapps
  \__webapps
  \__logs

NOTE: .war files are still inside the webapps directory and had to be moved
out manually to follow Mark's recommended configuration or static resources
are not loaded.

Rinse & repeat for other domains

This is now working on my server. Although not exactly what I wanted... 
1-had to move extracted war directories OUT of webapps
2-ROOT context in /tomcat_home/conf/Catalina/domain1 directory (using that
"ROOT" name)


I did try it by naming the context file, but then had to explicitly call up
my site in the browser as such: http://domain1.com/domain1 and that is
undesirable.

One thing that I thought of is to perform a "redirect" from an index.jsp
file, but then that starts to get a bit confusing and once again
undesirable.

Why does my original configuration not work anymore? I will keep Mark's
recommended configuration but would like to know they "why" behind the
"how". Helps me understand when launching other sites on this server (there
will be another 4 virtual hosts, each serving up 3 or 4 webapps).


Hope this helps you some ahnf (op) and Jeff... I know this thread helped me.


Now, I go fight with the mod_jk 



~LZM~










-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 10:41 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts: path="/" without using ROOT folder?

Lessie Z. Mitch wrote:
> Sorry.. didn't finish... (hit the damned button)
> 
> And my application context.xml files would read something like...

No - completely wrong. In short (just doing one host) you want something
like:

/tomcat_home/conf/server.xml

   
   

Context file location (for ROOT webapp):
/tomcat_home/conf/Catali

Re: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread AH NF
Thanks Mark, could my context.xml also just live in my WAR/META-INF  
file?


So let me get this right,  the location of "appBase" is purely for  
where WARs are uploaded. Never should "document roots" live under it?


So if I upload a war to "appBase" Tomcat then unpacks it to the  
"context" "docbase"?









On Feb 26, 2008, at 1:40 PM, Mark Thomas wrote:


Lessie Z. Mitch wrote:

Sorry.. didn't finish... (hit the damned button)
And my application context.xml files would read something like...


No - completely wrong. In short (just doing one host) you want  
something like:


/tomcat_home/conf/server.xml




Context file location (for ROOT webapp):
/tomcat_home/conf/Catalina/mydomain1.net/ROOT.xml


Contents of .../mydomain1.net/ROOT.xml:



The docBase *must not* be under the appBase (home/web/mydomain1.net/ 
webapps)


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]







Re: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread AH NF
Here is what I have setup going off the examples, but it is not  
working like a I would like


a) a Host definition in my server.xml which has appBase="tomcatHome/ 
myAppBase"


b) a WAR file named ROOT.war. Inside there is a context.xml located in  
META-INF
 I am not sure what to put in for the path and/or docBase  
attributes. I would prefer not to have to defined the context in  
Catalina//ROOT.xml, i would like the context.xml to go along  
inside the WAR


c) I upload the root.war file to my Host above via the Manager app  
(which I also have configured for the host)


d) Tomcat accepts the war and puts it in the appBase above.

e) Tomcat extracts the WAR file but I get a directory structure as  
follows

tomcatHome/myAppBase/ROOT/ROOT/

The app also never starts. Basically I just want to have one virtual  
host per-war that I need to deploy to it. I don't want to have to  
defined the context on the server and would like to have it defined in  
META-INF. Each WAR is a one-to-one with a virtual host and when  
deployed via manager, or ant, I want it to respond to the http:// 
/  as the default / context for that tomcat host.


thanks for the assistance.


On Feb 26, 2008, at 1:40 PM, Mark Thomas wrote:


Lessie Z. Mitch wrote:

Sorry.. didn't finish... (hit the damned button)
And my application context.xml files would read something like...


No - completely wrong. In short (just doing one host) you want  
something like:


/tomcat_home/conf/server.xml

 
 

Context file location (for ROOT webapp):
/tomcat_home/conf/Catalina/mydomain1.net/ROOT.xml


Contents of .../mydomain1.net/ROOT.xml:



The docBase *must not* be under the appBase (home/web/mydomain1.net/ 
webapps)


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]





-
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 Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Lessie Z. Mitch
This is going to be long... so bear with me.



My want was to name the context xmls something other than "ROOT". 

In a previous setup I had with TC5.5.16, my contexts were actually in the
server.xml document - which we all know is really a bad thing. I had other
webapps running on the same host so when accessing them will be with a root
domain and then subapps which are explicitly named in the url. We did not
want to use "ROOT" as there are several hosts and "ROOT" gets confusing.

Keep in mind all .war files extract their own directories in each instance
(thus directories being explicit).

Example 3 virtual hosts:
domain1
domain2
domain3

All needing to be separate due to SSL issues, thus had IP structure defined
in Apache (yet another story - will stick to TC configurations)


OLD SETUP 

/tomcat_home/conf/server.xml


 
 
 
 
 
 




 
 
 
 
 
 




 
 
 
 
 
 


Physical Directories:
Home
\__web
   \__domain1
  \__logs
  \__webapps
 \__domain1
 \__wiki1
 \__forum1
   \__domain2
  \__logs
  \__webapps
 \__domain2
 \__wiki2
 \__forum2
   \__domain3
  \__logs
  \__webapps
 \__domain3
 \__wiki3
 \__forum3


I didn't use anything "ROOT" for the server.xml explicitly called out my
contexts and segregated them. I will note that this was a stable
configuration until about the beginning of December08. I don't know what
happened, but my server became unstable, and eventually had a memory
melt-down (we called it a stroke). I had to totally redo the server - from
scratch. 

So now I move the contexts out of the server.xml into this recommended
configuration. Keep in mind, I am STILL working with war files that extract
to directories.


/tomcat_home/conf/server.xml

 
 

 
 

 
 

Context files for domain1 (will only do domain1 as the other two are
mimicked)
/tomcat_home/conf/Catalina/domain1.com/ROOT.xml  ~~ this is so that when
type http://domain1.com/ site will appear


/tomcat_home/conf/Catalina/domain1.com/wiki1.xml  ~~ this is so that when
type http://domain1.com/wiki this sub-site will appear


/tomcat_home/conf/Catalina/domain1.com/form1.xml  ~~ this is so that when
type http://domain1.com/forum this sub-site will appear



Physical directory
Home
\__web
   \__domain1.com
  \__domain1   ~~~ from war located in webapps, moved it out as war
extracts into webapps
  \__wiki  ~~~ from war located in webapps, moved it out as war
extracts into webapps
  \__forum ~~~ from war located in webapps, moved it out as war
extracts into webapps
  \__webapps
  \__logs

NOTE: .war files are still inside the webapps directory and had to be moved
out manually to follow Mark's recommended configuration or static resources
are not loaded.

Rinse & repeat for other domains

This is now working on my server. Although not exactly what I wanted... 
1-had to move extracted war directories OUT of webapps
2-ROOT context in /tomcat_home/conf/Catalina/domain1 directory (using that
"ROOT" name)


I did try it by naming the context file, but then had to explicitly call up
my site in the browser as such: http://domain1.com/domain1 and that is
undesirable.

One thing that I thought of is to perform a "redirect" from an index.jsp
file, but then that starts to get a bit confusing and once again
undesirable.

Why does my original configuration not work anymore? I will keep Mark's
recommended configuration but would like to know they "why" behind the
"how". Helps me understand when launching other sites on this server (there
will be another 4 virtual hosts, each serving up 3 or 4 webapps).


Hope this helps you some ahnf (op) and Jeff... I know this thread helped me.


Now, I go fight with the mod_jk 



~LZM~










-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 10:41 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts: path="/" without using ROOT folder?

Lessie Z. Mitch wrote:
> Sorry.. didn't finish... (hit the damned button)
> 
> And my application context.xml files would read something like...

No - completely wrong. In short (just doing one host) you want something
like:

/tomcat_home/conf/server.xml

   
   

Context file location (for ROOT webapp):
/tomcat_home/conf/Catalina/mydomain1.net/ROOT.xml


Contents of .../mydomain1.net/ROOT.xml:



The docBase *must not* be under the appBase (home/web/mydomain1.net/webapps)

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]

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 2

Re: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Mark Thomas

Lessie Z. Mitch wrote:

Sorry.. didn't finish... (hit the damned button)

And my application context.xml files would read something like...


No - completely wrong. In short (just doing one host) you want something like:

/tomcat_home/conf/server.xml

  
  

Context file location (for ROOT webapp):
/tomcat_home/conf/Catalina/mydomain1.net/ROOT.xml


Contents of .../mydomain1.net/ROOT.xml:



The docBase *must not* be under the appBase (home/web/mydomain1.net/webapps)

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]



RE: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Lessie Z. Mitch
Sorry.. didn't finish... (hit the damned button)

And my application context.xml files would read something like...


For webapp1 - a deployed .war file



For webapp2 - a .jsp structure - no .war





No path element?

Maluhia mua (Safety first)
~~
Lessie Z. Mitch – 
SAFETY SYSTEMS HAWAII
BRANDY SIGNS
815 Waiakamilo Rd.
Honolulu, HI  96817
FX 808|842.1233
CL 808|306.9914 (24/7)
PH 808|847.4017 (8a - 5p HST)
www.safetysystemshawaii.com
www.brandysigns.com
"Read not to contradict and confute, nor to believe and take for granted,
nor to find talk and discourse, but to weigh and consider." ~ Harold Bloom

CONFIDENTIALITY NOTICE: 
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential as well as privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited by international law. If you are not the intended recipient,
please contact the sender by reply e-mail and destroy all copies of the
original message.


-Original Message-
From: Lessie Z. Mitch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 10:19 AM
To: 'Tomcat Users List'
Subject: RE: Virtual Hosts: path="/" without using ROOT folder?

> Use context.xml - approach #2 and configure both a docBase and a path.
Note the docBase *must* be outside of any host's appBase.

So I can have setup as such:

Server setup
/tomcat_home/conf/server.xml


  
  


  
  

Context file locations:
/tomcat_home/conf/Catalina/mywebapp1/mywebapp1.xml
/tomcat_home/conf/Catalina/mywebapp2/mywebapp2.xml


Webapps locations (totally different sites & domain names:
/home/web/mywebapp1/webapps/   (.war deployment)
/home/web/mywebapp2/webapps/   (.jsp deployment)


Maluhia mua (Safety first)
~~
Lessie Z. Mitch – 
SAFETY SYSTEMS HAWAII
BRANDY SIGNS
815 Waiakamilo Rd.
Honolulu, HI  96817
FX 808|842.1233
CL 808|306.9914 (24/7)
PH 808|847.4017 (8a - 5p HST)
www.safetysystemshawaii.com
www.brandysigns.com
"Read not to contradict and confute, nor to believe and take for granted,
nor to find talk and discourse, but to weigh and consider." ~ Harold Bloom

CONFIDENTIALITY NOTICE: 
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential as well as privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited by international law. If you are not the intended recipient,
please contact the sender by reply e-mail and destroy all copies of the
original message.


-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:51 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts: path="/" without using ROOT folder?

ahnf wrote:
> My question is, is there any way other than making the application's root
directory be "ROOT" or deployed under ROOT/ in order to get it to respond to
"/"? I tried the "path" attribute but it says that it is only valid when the
 is defined in server.xml and not in META-INFO/context.xml. 
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

Use context.xml - approach #2 and configure both a docBase and a path. Note 
the docBase *must* be outside of any host's appBase.

> Secondly, I read the docs on how to get the "manager" application to show
up for each of my virtual hosts (copy manager.xml from Catalina/localhost/
and move it to Catalina//, 
> however when my virtual host boots up and I go to /manager I get a
404. However when I got to localhost/manager the manager comes up however it
knows nothing about the apps under my virtual hosts?

Again, see context.xml -
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

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]

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 


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

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2

RE: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Lessie Z. Mitch
> Use context.xml - approach #2 and configure both a docBase and a path.
Note the docBase *must* be outside of any host's appBase.

So I can have setup as such:

Server setup
/tomcat_home/conf/server.xml


  
  


  
  

Context file locations:
/tomcat_home/conf/Catalina/mywebapp1/mywebapp1.xml
/tomcat_home/conf/Catalina/mywebapp2/mywebapp2.xml


Webapps locations (totally different sites & domain names:
/home/web/mywebapp1/webapps/   (.war deployment)
/home/web/mywebapp2/webapps/   (.jsp deployment)


Maluhia mua (Safety first)
~~
Lessie Z. Mitch – 
SAFETY SYSTEMS HAWAII
BRANDY SIGNS
815 Waiakamilo Rd.
Honolulu, HI  96817
FX 808|842.1233
CL 808|306.9914 (24/7)
PH 808|847.4017 (8a - 5p HST)
www.safetysystemshawaii.com
www.brandysigns.com
"Read not to contradict and confute, nor to believe and take for granted,
nor to find talk and discourse, but to weigh and consider." ~ Harold Bloom

CONFIDENTIALITY NOTICE: 
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential as well as privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited by international law. If you are not the intended recipient,
please contact the sender by reply e-mail and destroy all copies of the
original message.


-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 8:51 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts: path="/" without using ROOT folder?

ahnf wrote:
> My question is, is there any way other than making the application's root
directory be "ROOT" or deployed under ROOT/ in order to get it to respond to
"/"? I tried the "path" attribute but it says that it is only valid when the
 is defined in server.xml and not in META-INFO/context.xml. 
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

Use context.xml - approach #2 and configure both a docBase and a path. Note 
the docBase *must* be outside of any host's appBase.

> Secondly, I read the docs on how to get the "manager" application to show
up for each of my virtual hosts (copy manager.xml from Catalina/localhost/
and move it to Catalina//, 
> however when my virtual host boots up and I go to /manager I get a
404. However when I got to localhost/manager the manager comes up however it
knows nothing about the apps under my virtual hosts?

Again, see context.xml -
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

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]

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 


-
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 Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Mark Thomas

Lessie Z. Mitch wrote:

If you are using apache, you still need to name your Virtual hosts in the
httpd.conf.

I am myself having mod_jk issues and awaiting response.



ahnf wrote:
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html


Does this work for TC5.5.x??? that is for TC6


Yes. Read the 5.5 docs for details.

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]



RE: Virtual Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Lessie Z. Mitch
If you are using apache, you still need to name your Virtual hosts in the
httpd.conf.

I am myself having mod_jk issues and awaiting response.


> ahnf wrote:
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

Does this work for TC5.5.x??? that is for TC6



-Original Message-
From: Jeff Hoffmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 9:16 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts: path="/" without using ROOT folder?

Mark Thomas wrote:
> ahnf wrote:
>> My question is, is there any way other than making the application's 
>> root directory be "ROOT" or deployed under ROOT/ in order to get it to 
>> respond to "/"? I tried the "path" attribute but it says that it is 
>> only valid when the  is defined in server.xml and not in 
>> META-INFO/context.xml. 
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
> 
> Use context.xml - approach #2 and configure both a docBase and a path. 
> Note the docBase *must* be outside of any host's appBase.

On a related note, is it possible to access these virtual hosts through 
connecters (mod_jk/Apache)?  I don't really know anything about the 
content of AJP connections -- do they pass the virtual host name to 
allow Tomcat to direct the requests to the right host or do all the 
requests go to the defaultHost?

-- 
Jeff Hoffmann
PropertyKey.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]

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.21.1/1299 - Release Date: 2/26/2008
9:08 AM
 


-
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 Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Jeff Hoffmann

Mark Thomas wrote:

ahnf wrote:
My question is, is there any way other than making the application's 
root directory be "ROOT" or deployed under ROOT/ in order to get it to 
respond to "/"? I tried the "path" attribute but it says that it is 
only valid when the  is defined in server.xml and not in 
META-INFO/context.xml. 

http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

Use context.xml - approach #2 and configure both a docBase and a path. 
Note the docBase *must* be outside of any host's appBase.


On a related note, is it possible to access these virtual hosts through 
connecters (mod_jk/Apache)?  I don't really know anything about the 
content of AJP connections -- do they pass the virtual host name to 
allow Tomcat to direct the requests to the right host or do all the 
requests go to the defaultHost?


--
Jeff Hoffmann
PropertyKey.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 Hosts: path="/" without using ROOT folder?

2008-02-26 Thread Mark Thomas

ahnf wrote:
My question is, is there any way other than making the application's root directory be "ROOT" or deployed under ROOT/ in order to get it to respond to "/"? I tried the "path" attribute but it says that it is only valid when the  is defined in server.xml and not in META-INFO/context.xml. 

http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

Use context.xml - approach #2 and configure both a docBase and a path. Note 
the docBase *must* be outside of any host's appBase.


Secondly, I read the docs on how to get the "manager" application to show up for each of my virtual hosts (copy manager.xml from Catalina/localhost/ and move it to Catalina//, 
however when my virtual host boots up and I go to /manager I get a 404. However when I got to localhost/manager the manager comes up however it knows nothing about the apps under my virtual hosts?


Again, see context.xml -
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

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]



Re: Virtual Hosts or Multiple Instances

2007-11-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Duane,

D W wrote:
> Does anybody have an opinion as to which approach is better?
> 
> Resource-wise?

Certainly, fewer memory and CPU resources are required to run a single
JVM with virtual hosting.

> Management-wise?

That depends on how to see management. I tend to see lots of options as
attractive for management. When using a single JVM, you only have one
option: stick both apps into the same Tomcat instance on the same
machine. If you have them separate, you have options like deploying them
on physically different machines, using different JVM versions, using
different JDBC driver versions, etc.

On the other hand, multiple Tomcat instances usually complicates the
"real world" because everyone expects that HTTP runs over port 80 and
HTTPS runs over port 443. If you want to run more than one Tomcat
instance and maintain that illusion, you need to run another service
(such as Apache httpd or some other web server / load balancer / etc.)
that can make decisions about which instance should be targeted.

I am personally very comfortable with this setup, but some
administrators tend to think that fewer components is universally
superior from a management standpoint. It certainly is less to think
about if you just have a single Tomcat instance. The only question is
whether or not you think the additional work is "hard" or not. I see it
as a relatively simple matter, but then again I don't manage hundreds of
servers.

Just my two cents,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHO0YE9CaO5/Lv0PARAr5RAKCQR9siKMnjRWbRBJcDGbKO7gt3CwCgnJtb
m6hXGFhD4KCu8+xf5eYW+Rc=
=7T2C
-END PGP SIGNATURE-

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

2007-11-13 Thread Rocco Scappatura
> > I would like to know if is there a similar concept to the 
> > 'VirtualHost' directive of Apache, in Tomcat.
> 
> It's not by any means identical, but the Tomcat documentation 
> for the concept is here:
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
> 

OK. Thanks.

> > Suppose then that I would like to give full access to the URL:
> > http:///path/subpath
> > and deny access to
> > http:///path
> 
> You need to read the security section of the servlet spec.  
> You can control access via URL pattern matching pretty much 
> any way you want.

Is there another way to hide http:///path to the outside
world?

Could anybody give me some hints on how could I set up security in this
case?

rocsca

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

2007-11-07 Thread Caldarale, Charles R
> From: Rocco Scappatura [mailto:[EMAIL PROTECTED] 
> Subject: Virtual hosts
> 
> I would like to know if is there a similar concept to the 
> 'VirtualHost' directive of Apache, in Tomcat.

It's not by any means identical, but the Tomcat documentation for the
concept is here:
http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html

> Suppose then that I would like to give full access to the URL:
> http:///path/subpath
> and deny access to
> http:///path

You need to read the security section of the servlet spec.  You can
control access via URL pattern matching pretty much any way you want.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Virtual hosts problem

2007-09-08 Thread Caldarale, Charles R
> From: micker [mailto:[EMAIL PROTECTED] 
> Subject: Virtual hosts problem
> 
> I have searched the internet for some conclusive guide, but 
> none seem to work.

Why not read the actual Tomcat doc first?  Besides the link Mark T
provided, here's the general one for Tomcat-specific configuration:
http://tomcat.apache.org/tomcat-5.5-doc/config/index.html

If you do go searching the internet, make sure you only look at
information for the 5.5 level.

>unpackWARs="true" autoDeploy="true"
>   xmlValidation="false" xmlNamespaceAware="false">

Is this the only ?  Is this the defaultHost for the ?  If
it's not the only one, make sure the appBase directory does not overlap
with other 's appBase settings.  If it is the only  you'll
have, you don't need to change what comes with Tomcat.

>directory="logs"  prefix="micker.dk\_log." suffix=".txt"
> timestamp="true"/>

 elements are not supported in 5.5.

> 
> 

 elements should not be placed in server.xml; the preferred
location is in the webapp's META-INF/context.xml file.  Regardless, as
Mark T pointed out, the docBase is invalid.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual hosts problem

2007-09-08 Thread Mark Thomas
micker wrote:
> I have searched the internet for some conclusive guide, but none seem to
> work.

You could always try the Tomcat documentation:
http://tomcat.apache.org/tomcat-5.5-doc/virtual-hosting-howto.html

> where have I screwed up?

You set appBase == docBase

I'll look into adding some more explict instructions to the HOW-TO.

Using the above doc, the ROOT webapp should be deployed as a war at
$CATALINA_HOME/webapps/stimpy/ROOT.war
or as an exploded dir at
$CATALINA_HOME/webapps/stimpy/ROOT

Other webapps would be deployed as:
$CATALINA_HOME/webapps/stimpy/foo.war
$CATALINA_HOME/webapps/stimpy/bar.war
etc

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]



Re: virtual Hosts multiple IP's (one to one mapping)

2007-06-04 Thread Mon Cab

Just found the answer: Hostname Aliases

http://tomcat.apache.org/tomcat-5.0-doc/config/host.html#Host%20Name%20Aliases


--- Mon Cab <[EMAIL PROTECTED]> wrote:

> 
> 
> I will hosting several domains on tomcat, and have configured each
> domain with it's own IP address through DNS, such that domain1.com,
> as
> well as www.domain1.com resolve to the ip address of the domain1. 
> (I.e. multiple hosts for each domain on each IP address).  
> 
> I am trying to get tomcat to serve the appropriate website for each
> respective domain (by assigning docbases appropriately in server.xml
> -
> requests for www.domain.com, domain.com, anything.domain.com should
> all
> result in the domain.com welcome page displaying.  
> 
> Unfortunately I cant seem to get it working using Tomcat as a
> standalone webserver.  (I am not forwarding requests through apache.)
>  
> 
> 
> I configures the server as follows (server.xml): 
> 
>  
> 
>  
> 
> 
> maxThreads="150" minSpareThreads="25"
> maxSpareThreads="75"
>enableLookups="false" redirectPort="8443"
> acceptCount="100"
>debug="0" connectionTimeout="2"
>disableUploadTimeout="true"
>address="111.111.111.111" />
> 
>   unpackWARs="true" autoDeploy="true"
>   xmlValidation="false" xmlNamespaceAware="false">
> 
>  debug="5" reloadable="true" crossContext="true">
>   ...
> 
>   
> 
> 
>  
> 
> 
> maxThreads="150" minSpareThreads="25"
> maxSpareThreads="75"
>enableLookups="false" redirectPort="8443"
> acceptCount="100"
>debug="0" connectionTimeout="2"
>disableUploadTimeout="true"
>address="222.222.222.222" />
> 
>   unpackWARs="true" autoDeploy="true"
>   xmlValidation="false" xmlNamespaceAware="false">
> 
>  debug="5" reloadable="true" crossContext="true">
>   ...
> 
>   
>   
> 
> With the above configuration, domain1.com is returing the domain2.com
> site.  
> 
> It seems that the host configuration in service catalina2, is
> overriding the definition in catalina1, so tha even though the 
> IP request is for www.domain1.com which resolves to IP
> 111.111.111.111,
> the webapp2 docbase is te one which is being served up.  
> 
> I dont want to define multiple hosts for each service, as I want to
> anything.domain1.com to return doamin1's welcome page.  
> 
> Does anyone have a solution for this?  
> 
> 
> 
> 
>
>

> Looking for a deal? Find great prices on flights and hotels with
> Yahoo! FareChase.
> http://farechase.yahoo.com/
> 



   

Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

-
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 Hosts [mostly solved]

2006-12-29 Thread Gormley, Josh
>>   * Not having to modify server.xml directly.  According to the
Tomcat
>> docs, you shouldn't modify this file.

> I think you may have misconstrued something in the docs.  There's
> nothing wrong with modifying server.xml; for example, production
> environments must change it and web.xml to remove development-oriented
> attributes.  Certainly you should not place  elements in
> server.xml, since that requires a Tomcat restart to modify webapp
> attributes.

Ok, that makes sense.  I got the feeling after a while that I was trying
to be too strict about that idea and it's nice to have somebody else
mention that.

>>   * Tomcat's server.xml file has a host declaration for each webapp 
>> and a declaration for localhost (though that is not necessary)
>> 

> I would remove the  entry for localhost, since, as someone else
> pointed out, its appBase points to a parent directory of the other
> s, and this is at best bad practice and confusing, even if not
> necessarily causing errors.

Good idea.  I have no good reason for leaving it there other than the
fact that it was there previously.

>>   * Being able to include the manager app for each host that I
define.

> I don't have a problem doing this.  All I did was place a copy of
> manager.xml is each conf/Catalina/[host] directory, and all apps
deploy
> properly under each of their hosts.  Did you change something in
> manager.xml?

I was able to get this to work as well.  For some reason, when I
manually created the conf/Catalina/[host] directory and placed the
manager.xml file in there before I restarted tomcat, I was getting odd
problems in not being able to deploy my app.  When I placed the
manager.xml file in there after I had the app up and running, I had no
problems with the manager app conflicting with my other app.

Thanks again for everybody's help on this -- I feel like I've finally
made progress on this issue and have a better understanding for how
things work.

Josh


-
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 Hosts [mostly solved]

2006-12-28 Thread Caldarale, Charles R
> From: Gormley, Josh [mailto:[EMAIL PROTECTED] 
> Subject: RE: Virtual Hosts [mostly solved]
> 
>   * Not having to modify server.xml directly.  According to the Tomcat
> docs, you shouldn't modify this file.

I think you may have misconstrued something in the docs.  There's
nothing wrong with modifying server.xml; for example, production
environments must change it and web.xml to remove development-oriented
attributes.  Certainly you should not place  elements in
server.xml, since that requires a Tomcat restart to modify webapp
attributes.

>   * Tomcat's server.xml file has a host declaration for each webapp 
> and a declaration for localhost (though that is not necessary)
> 

I would remove the  entry for localhost, since, as someone else
pointed out, its appBase points to a parent directory of the other
s, and this is at best bad practice and confusing, even if not
necessarily causing errors.

>   * Being able to include the manager app for each host that I define.

I don't have a problem doing this.  All I did was place a copy of
manager.xml is each conf/Catalina/[host] directory, and all apps deploy
properly under each of their hosts.  Did you change something in
manager.xml?

- 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Virtual Hosts [mostly solved]

2006-12-28 Thread Caldarale, Charles R
> From: Mark Eggers [mailto:[EMAIL PROTECTED] 
> Subject: RE: Virtual Hosts [mostly solved]
> 
> For a root context, I usually set up an
> application.xml file in conf/Catalina// with
> the appropriate path="" in the Context element

That's incorrect for all recent versions of Tomcat.  You must not use a
path attribute unless the  element is in server.xml, which is
strongly discouraged.  For the default app, place the  element
with an appropriate docBase in a file named ROOT.xml inside each
conf/Catalina/[host] directory.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Virtual Hosts [mostly solved]

2006-12-28 Thread Mark Eggers
You may find that the default host loads all of the
web applications.

In order to solve this, make sure that each of the
contexts are not some subdirectory of another context.






You can use an absolute path to place this structure
outside of your Tomcat installation.  For large
structures I think this is nice, because then you can
upgrade Tomcat without disturbing your applications. 
Cutover would involve installing a parallel Tomcat,
modifying server.xml. shutting down the old version,
and starting up the new version.  If the new version
failed, recovery is just shutting down the new version
and starting up the old version.

If you want a one-stop place for all of your web
applications, please ignore this comment.

For a root context, I usually set up an
application.xml file in conf/Catalina// with
the appropriate path="" in the Context element, or a
context.xml file in the web application's META-INF
directory with the same context information.

Once you separate each of the virtual hosts so that
subdirectories don't overlap, I think you will find
that multiple manager applications work.  The manager
application will then be specific to the virtual host,
and you'll have to access that manager application by
going to the specific virtual host (ie,
http://:8080/manager/html)

HTH

/mde/
. . . . . just my two cents

--- "Gormley, Josh" <[EMAIL PROTECTED]> wrote:

> With the help of several people on this list, I've
> been able to get my
> server configured [mostly] the way I wanted it
> configured.  Here's my
> solution, hopefully it will be helpful to others
> 
> Goals:
>   * One instance of Tomcat running behind Apache
>   * Multiple VirtualHosts, each pointing to its own
> Tomcat webapp
>   * The ability to hot-deploy an app without
> affecting the other apps
>   * Minimal or no modifications required to
> server.xml for additional
> hosts
>   * A solution that is maintainable and is not a
> hack
> 
> Solution:
>   * Apache with mod_jk
>   * Each domain has a .conf file at
> /etc/httpd/conf.d/vhosts
> * The conf file routes .do and .jsp files to
> tomcat using mod_jk
> JkMount /*.do router
> JkMount /*.jsp router
> * The VirtualHost declaration has the
> DocumentRoot set to the path
>   of the webapp
>   * Tomcat's server.xml file has a host declaration
> for each webapp 
> and a declaration for localhost (though that is
> not necessary)
> 
>  appBase="webapps/foo" />
>  appBase="webapps/bar" />
>  appBase="webapps/eggs" />
>   * Deploy a war file named ROOT.war to the correct
> appBase for each
> application.  This file must be named ROOT.war
>   * GOTCHA: I tried to also include the manager
> webapp for each of the 
> hosts by adding the manager.xml file to 
> $CATALINA_HOME/conf/Catalina/foo.mydomain.com/
> as described here
>
>
http://webtuitive.com/samples/virtual-hosting-howto.jsp
> but by having a context defined in this
> location, I was not able 
> to deploy my applications using Automatic
> Application Deployment
> as defined in the Tomcat docs.  I'm not sure why
> this doesn't work
> but by removing the manager.xml file, I am able
> to hot-deploy my
> apps.
> 
> This is working well for me, and that in itself
> makes me happy.  The 
> only things I'd like to improve upon are:
>   * Not having to modify server.xml directly. 
> According to the Tomcat
> docs, you shouldn't modify this file.  I'm not
> sure how to avoid 
> this.
>   * Being able to include the manager app for each
> host that I define.
> I
> was using ant's tomcat tasks to tie into the
> manager for deploying
> my apps, but now I have to scp the war file into
> the directory.
> This isn't the worst thing that could happen,
> but it seems like 
> there is a solution out there for this.
> 
> Anyway, thanks to everybody who helped out on this.
> 
> Josh Gormley
> 
> 
> 
> -Original Message-
> From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 28, 2006 9:34 AM
> To: Tomcat Users List
> Subject: Re: Virtual Hosts
> 
> Gormley, Josh wrote:
> > As a side question, is this possible to do without
> modifying the
> > server.xml file every time I want to add a new
> host?  I've read that
> > it's bad practice to modify the server.xml file
> much like it's bad
> > practice to modify the httpd.conf file in Apache. 
> In Apache, I have a
> > vhost directory with .conf files for each host --
> is there a similar
> > method 

RE: Virtual Hosts [mostly solved]

2006-12-28 Thread Gormley, Josh
With the help of several people on this list, I've been able to get my
server configured [mostly] the way I wanted it configured.  Here's my
solution, hopefully it will be helpful to others

Goals:
  * One instance of Tomcat running behind Apache
  * Multiple VirtualHosts, each pointing to its own Tomcat webapp
  * The ability to hot-deploy an app without affecting the other apps
  * Minimal or no modifications required to server.xml for additional
hosts
  * A solution that is maintainable and is not a hack

Solution:
  * Apache with mod_jk
  * Each domain has a .conf file at /etc/httpd/conf.d/vhosts
* The conf file routes .do and .jsp files to tomcat using mod_jk
JkMount /*.do router
JkMount /*.jsp router
* The VirtualHost declaration has the DocumentRoot set to the path
  of the webapp
  * Tomcat's server.xml file has a host declaration for each webapp 
and a declaration for localhost (though that is not necessary)




  * Deploy a war file named ROOT.war to the correct appBase for each
application.  This file must be named ROOT.war
  * GOTCHA: I tried to also include the manager webapp for each of the 
hosts by adding the manager.xml file to 
$CATALINA_HOME/conf/Catalina/foo.mydomain.com/ as described here
http://webtuitive.com/samples/virtual-hosting-howto.jsp
but by having a context defined in this location, I was not able 
to deploy my applications using Automatic Application Deployment
as defined in the Tomcat docs.  I'm not sure why this doesn't work
but by removing the manager.xml file, I am able to hot-deploy my
apps.

This is working well for me, and that in itself makes me happy.  The 
only things I'd like to improve upon are:
  * Not having to modify server.xml directly.  According to the Tomcat
docs, you shouldn't modify this file.  I'm not sure how to avoid 
this.
  * Being able to include the manager app for each host that I define.
I
was using ant's tomcat tasks to tie into the manager for deploying
my apps, but now I have to scp the war file into the directory.
This isn't the worst thing that could happen, but it seems like 
there is a solution out there for this.

Anyway, thanks to everybody who helped out on this.

Josh Gormley



-Original Message-
From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 28, 2006 9:34 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts

Gormley, Josh wrote:
> As a side question, is this possible to do without modifying the
> server.xml file every time I want to add a new host?  I've read that
> it's bad practice to modify the server.xml file much like it's bad
> practice to modify the httpd.conf file in Apache.  In Apache, I have a
> vhost directory with .conf files for each host -- is there a similar
> method to do this with Tomcat?
>   
There is a host-manager webapp which comes with Tomcat to allow adding 
vhosts on the fly (I haven't used it, however). You will need user with 
admin role in tomcat-users.xml to access it.

-- 
Mikolaj Rydzewski <[EMAIL PROTECTED]>



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

2006-12-28 Thread Mikolaj Rydzewski

Gormley, Josh wrote:

As a side question, is this possible to do without modifying the
server.xml file every time I want to add a new host?  I've read that
it's bad practice to modify the server.xml file much like it's bad
practice to modify the httpd.conf file in Apache.  In Apache, I have a
vhost directory with .conf files for each host -- is there a similar
method to do this with Tomcat?
  
There is a host-manager webapp which comes with Tomcat to allow adding 
vhosts on the fly (I haven't used it, however). You will need user with 
admin role in tomcat-users.xml to access it.


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


RE: Virtual Hosts

2006-12-28 Thread Gormley, Josh
Thanks Mikolaj.  I'm going to try out having multiple appBases and
deploy as the ROOT in each.  I haven't tried that yet.  

As a side question, is this possible to do without modifying the
server.xml file every time I want to add a new host?  I've read that
it's bad practice to modify the server.xml file much like it's bad
practice to modify the httpd.conf file in Apache.  In Apache, I have a
vhost directory with .conf files for each host -- is there a similar
method to do this with Tomcat?

Thanks,
JG

-Original Message-
From: Mikolaj Rydzewski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 28, 2006 8:42 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts

Gormley, Josh wrote:
> Does anybody have a good tutorial on how to do this with Apache
sitting in front of Tomcat?  I'd like to have a single server with
multiple one-to-one domainname-to-webapp apps running in Tomcat such
that I can hot deploy one webapp in Tomcat without affecting the other
webapps.
>
> Apache VirtualHost -- Tomcat webapp location
> foo.mydomain.com   -- webapps/foo
> bar.mydomain.com   -- webapps/bar
> eggs.mydomain.com  -- webapps/eggs
>   
I think it is possible to achieve this using various mod_rewrite / 
mod_proxy directives, e.i. 
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse

On the other hand, it is very easy to add another Host elements to 
Tomcat's server.xml file:

default entry:



another vhosts:





and deploy your apps in ROOT contexts.

-- 
Mikolaj Rydzewski <[EMAIL PROTECTED]>



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

2006-12-28 Thread Mikolaj Rydzewski

ben short wrote:

I have used something like the following with mod proxy.

This goes in your apache config file


ServerName www.domainname.co.uk
ServerAlias www.domainname.com
ProxyPass / http://192.168.100.20:8080/yourwebapp/
ProxyPassReverse / http://192.168.100.20:8080/youwebapp/
This will not work with struts application. Taglibs used with struts 
make use of application's context, so you will end with invalid links 
like www.domainname.com/yourwebapp


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Virtual Hosts

2006-12-28 Thread Mikolaj Rydzewski

ben short wrote:

I have used something like the following with mod proxy.

This goes in your apache config file


ServerName www.domainname.co.uk
ServerAlias www.domainname.com
ProxyPass / http://192.168.100.20:8080/yourwebapp/
ProxyPassReverse / http://192.168.100.20:8080/youwebapp/
ProxyRequests off
ErrorLog logs/youwebapp-error_log
TransferLog logs/youwebapp-access_log



How does this config handle cookies? Tomcat sets cookies with path set 
to application's context, not the website root.


--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Virtual Hosts

2006-12-28 Thread ben short

I have used something like the following with mod proxy.

This goes in your apache config file


ServerName www.domainname.co.uk
ServerAlias www.domainname.com
ProxyPass / http://192.168.100.20:8080/yourwebapp/
ProxyPassReverse / http://192.168.100.20:8080/youwebapp/
ProxyRequests off
ErrorLog logs/youwebapp-error_log
TransferLog logs/youwebapp-access_log



On 12/28/06, Gormley, Josh <[EMAIL PROTECTED]> wrote:

Does anybody have a good tutorial on how to do this with Apache sitting in 
front of Tomcat?  I'd like to have a single server with multiple one-to-one 
domainname-to-webapp apps running in Tomcat such that I can hot deploy one 
webapp in Tomcat without affecting the other webapps.

Apache VirtualHost -- Tomcat webapp location
foo.mydomain.com   -- webapps/foo
bar.mydomain.com   -- webapps/bar
eggs.mydomain.com  -- webapps/eggs

Thanks,
JG

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 27, 2006 10:33 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts

On 12/27/06, Víctor Fragoso <[EMAIL PROTECTED]> wrote:

> ... but when I try it, just a blank page shows up

And there are no errors in the logs? Look there first.

Also, perhaps this will help:
  <http://webtuitive.com/samples/virtual-hosting-howto.jsp>

If not, post the relevant parts of your server.xml and Context files...

--
Hassan Schroeder  [EMAIL PROTECTED]

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




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




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

2006-12-28 Thread Mikolaj Rydzewski

Gormley, Josh wrote:

Does anybody have a good tutorial on how to do this with Apache sitting in 
front of Tomcat?  I'd like to have a single server with multiple one-to-one 
domainname-to-webapp apps running in Tomcat such that I can hot deploy one 
webapp in Tomcat without affecting the other webapps.

Apache VirtualHost -- Tomcat webapp location
foo.mydomain.com   -- webapps/foo
bar.mydomain.com   -- webapps/bar
eggs.mydomain.com  -- webapps/eggs
  
I think it is possible to achieve this using various mod_rewrite / 
mod_proxy directives, e.i. 
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse


On the other hand, it is very easy to add another Host elements to 
Tomcat's server.xml file:


default entry:



another vhosts:





and deploy your apps in ROOT contexts.

--
Mikolaj Rydzewski <[EMAIL PROTECTED]>



smime.p7s
Description: S/MIME Cryptographic Signature


RE: Virtual Hosts

2006-12-28 Thread Gormley, Josh
Does anybody have a good tutorial on how to do this with Apache sitting in 
front of Tomcat?  I'd like to have a single server with multiple one-to-one 
domainname-to-webapp apps running in Tomcat such that I can hot deploy one 
webapp in Tomcat without affecting the other webapps.

Apache VirtualHost -- Tomcat webapp location
foo.mydomain.com   -- webapps/foo
bar.mydomain.com   -- webapps/bar
eggs.mydomain.com  -- webapps/eggs

Thanks,
JG

-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 27, 2006 10:33 AM
To: Tomcat Users List
Subject: Re: Virtual Hosts

On 12/27/06, Víctor Fragoso <[EMAIL PROTECTED]> wrote:

> ... but when I try it, just a blank page shows up

And there are no errors in the logs? Look there first.

Also, perhaps this will help:
  <http://webtuitive.com/samples/virtual-hosting-howto.jsp>

If not, post the relevant parts of your server.xml and Context files...

-- 
Hassan Schroeder  [EMAIL PROTECTED]

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




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

2006-12-27 Thread Víctor Fragoso

Hey, thanks for the help, I made it!
Cheers!


On 12/27/06, Hassan Schroeder <[EMAIL PROTECTED]> wrote:


On 12/27/06, Víctor Fragoso <[EMAIL PROTECTED]> wrote:

> ... but when I try it, just a blank page shows up

And there are no errors in the logs? Look there first.

Also, perhaps this will help:
  

If not, post the relevant parts of your server.xml and Context files...

--
Hassan Schroeder  [EMAIL PROTECTED]

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





--
Víctor Manuel Fragoso Rojas
Personal Website: http://www.stonedgorilla.net/


Re: Virtual Hosts

2006-12-27 Thread Hassan Schroeder

On 12/27/06, Víctor Fragoso <[EMAIL PROTECTED]> wrote:


... but when I try it, just a blank page shows up


And there are no errors in the logs? Look there first.

Also, perhaps this will help:
 

If not, post the relevant parts of your server.xml and Context files...

--
Hassan Schroeder  [EMAIL PROTECTED]

-
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 Hosts + Tomcat 5 + Windows

2006-05-09 Thread Jorge Isaac Martínez Hatch

Thank you Marc,

Other question: Can I have IP-Based Virtual Hosting using just Tomcat, or I 
need Apache running and then Tomcat?


Any help is welcome...
Isaac Martinez


- Original Message - 
From: "Marc Farrow" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, May 09, 2006 2:41 PM
Subject: Re: Virtual Hosts + Tomcat 5 + Windows



The HTTPD.CONF file is an Apache file, not a Tomcat file.  You are mixing
two different products.

On 5/9/06, Jorge Isaac Martínez Hatch <[EMAIL PROTECTED]> wrote:


Hi,

I found information of how to create a virtual host adding some code to
the
httpd.conf file, but I'm running Windows not Linux. I don't have a
httpd.conf file.

Should I put this code somewhere else? maybe in the server.xml?


   ServerName www.somedomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]



   ServerName www.otherdomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]


Thank you,
Isaac Martinez


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





--
Marc Farrow




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



Re: Virtual Hosts + Tomcat 5 + Windows

2006-05-09 Thread Marc Farrow

The HTTPD.CONF file is an Apache file, not a Tomcat file.  You are mixing
two different products.

On 5/9/06, Jorge Isaac Martínez Hatch <[EMAIL PROTECTED]> wrote:


Hi,

I found information of how to create a virtual host adding some code to
the
httpd.conf file, but I'm running Windows not Linux. I don't have a
httpd.conf file.

Should I put this code somewhere else? maybe in the server.xml?


   ServerName www.somedomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]



   ServerName www.otherdomain.com
   DocumentRoot [path]
   ServerAdmin [EMAIL PROTECTED]
   ErrorLog [path]
   TransferLog [path]


Thank you,
Isaac Martinez


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





--
Marc Farrow