You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dennis de Champeaux <at...@yahoo.com> on 2011/06/20 21:58:57 UTC

Tomcat6/7 virtual hosting - yet again

This is my 4th day trying to setup virtual hosting on Linux-Debian;
even trying Tomcat6 after failing on Tomcat7.

Yes I have read everything that I can find in Tomcat documentation -
including the obtuse:
   http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html
what I found on this forum for March:
   http://mail-archives.apache.org/mod_mbox/tomcat-users/
as well as all as many, many well intended explanations located on the
Web.  Please acknowledge my stupidity, but help anyway.

This is long indeed.  On purpose.  I believe we need a detailed
description how to do it correct.  Note, I do NOT use WAR-file
deployment.  [It is not clear to me whether that is relevant ...]


I test using a windows XP box which allows to create a bogus domain in
the file:
   C:\WINDOWS\system32\drivers\etc\hosts
It has the line:
   206.41.127.116  www.testzzz.com

Using a browser (on that box) to access that bogus domain
www.testzzz.com "works" but gives an unexpected response:
   Index of /
   [ICO]    Name    Last modified    Size    Description
   Apache/2.2.9 (Debian) Server at www.testzzz.com Port 80
The site, apparently, was able to get to the right place, but ...
I expected to access an index.html file under a ROOT directory, see
below.


Here the testzzz directory structure:
   /home/ddc/test
   /home/ddc/test/ROOT
   /home/ddc/test/host-manager
   /home/ddc/test/manager
   /home/ddc/test/ROOT/index.html
   /home/ddc/test/ROOT/WEB-INF
   /home/ddc/test/ROOT/WEB-INF/web.xml
   

No, there are no errors in catalina.out.
   
That log does have a line showing that ROOT.xml is activated:
   INFO: Deploying configuration descriptor ROOT.xml

I do NOT see deployment of www.testzzz.com.

Under webapps/ I see auto generated directories for:
   ROOT, docs, examples, host-manager, manager

In logs, I see empty logs for:
   manager
   host-manager
   localhost
   testzzz access log
I expected that the testzzz log would grow.


Here is what I have in server.xml (pruned):
   <Engine name="Catalina" defaultHost="www.testzzz.com">
     <Host name="www.testzzz.com"  appBase="/home/ddc/test"
           unpackWARs="true" autoDeploy="true"
           xmlValidation="false" xmlNamespaceAware="false">
     </Host>
   
Under .../Catalina:
   www.testzzz.com   
   www.testzzz.com/ROOT.xml
   www.testzzz.com/manager.xml
   www.testzzz.com/host-manager.xml

Inside ROOT.xml:
   <?xml version="1.0" encoding="UTF-8"?>
   <Context path="" reloadable="false" crossContext="false">
   </Context>
   

Now what?
And what would be the layout for a 2nd virtual host?

THANKS ...

----------------------------------------------------------------------------------------

Home page:                          rs6.risingnet.net/~ddcc

Health Info Anytime for Everyone:   www.HealthCheck4Me.info

Exercise for the Mind:              www.SuDoKuChallenge.us

Marketing site:                     www.OntoOO.com

            >>  Do NOT buy Dell, Mac, Ford, Chrysler  <<

            >>         Boycott Chinese Products       <<

Re: Tomcat6/7 virtual hosting - yet again

Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message -----

> From: Dennis de Champeaux <at...@yahoo.com>
> To: users@tomcat.apache.org
> Cc: dennis <dd...@ontooo.com>
> Sent: Monday, June 20, 2011 12:58 PM
> Subject: Tomcat6/7 virtual hosting - yet again
> 
>T his is my 4th day trying to setup virtual hosting on Linux-Debian;
> even trying Tomcat6 after failing on Tomcat7.
> 
> Yes I have read everything that I can find in Tomcat documentation -
> including the obtuse:
>    http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html
> what I found on this forum for March:
>    http://mail-archives.apache.org/mod_mbox/tomcat-users/
> as well as all as many, many well intended explanations located on the
> Web.  Please acknowledge my stupidity, but help anyway.
> 
> This is long indeed.  On purpose.  I believe we need a detailed
> description how to do it correct.  Note, I do NOT use WAR-file
> deployment.  [It is not clear to me whether that is relevant ...]
> 
> 
> I test using a windows XP box which allows to create a bogus domain in
> the file:
>    C:\WINDOWS\system32\drivers\etc\hosts
> It has the line:
>    206.41.127.116  www.testzzz.com
> 
> Using a browser (on that box) to access that bogus domain
> www.testzzz.com "works" but gives an unexpected response:
>    Index of /
>    [ICO]    Name    Last modified    Size    Description
>    Apache/2.2.9 (Debian) Server at www.testzzz.com Port 80
> The site, apparently, was able to get to the right place, but ...
> I expected to access an index.html file under a ROOT directory, see
> below.
> 
> 
> Here the testzzz directory structure:
>    /home/ddc/test
>    /home/ddc/test/ROOT
>    /home/ddc/test/host-manager
>    /home/ddc/test/manager
>    /home/ddc/test/ROOT/index.html
>    /home/ddc/test/ROOT/WEB-INF
>    /home/ddc/test/ROOT/WEB-INF/web.xml
>    
> 
> No, there are no errors in catalina.out.
>    
> That log does have a line showing that ROOT.xml is activated:
>    INFO: Deploying configuration descriptor ROOT.xml
> 
> I do NOT see deployment of www.testzzz.com.
> 
> Under webapps/ I see auto generated directories for:
>    ROOT, docs, examples, host-manager, manager
> 
> In logs, I see empty logs for:
>    manager
>    host-manager
>    localhost
>    testzzz access log
> I expected that the testzzz log would grow.
> 
> 
> Here is what I have in server.xml (pruned):
>    <Engine name="Catalina" 
> defaultHost="www.testzzz.com">
>      <Host name="www.testzzz.com"  
> appBase="/home/ddc/test"
>            unpackWARs="true" autoDeploy="true"
>            xmlValidation="false" 
> xmlNamespaceAware="false">
>      </Host>
>    
> Under .../Catalina:
>    www.testzzz.com   
>    www.testzzz.com/ROOT.xml
>    www.testzzz.com/manager.xml
>    www.testzzz.com/host-manager.xml
> 
> Inside ROOT.xml:
>    <?xml version="1.0" encoding="UTF-8"?>
>    <Context path="" reloadable="false" 
> crossContext="false">
>    </Context>
>    
> 
> Now what?
> And what would be the layout for a 2nd virtual host?


Here's a reasonably detailed description for the Tomcat part (using Tomcat 6.0.26 on Fedora and Windows).

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


I've not written up how to map this to Apache HTTPD virtual hosts, but basically that should just be placing the right JkMount directives in the correct Apache HTTPD virtual hosts.

As other people have pointed out, if you want to access your web sites on port 80, you'll either have to use something like mod_jk, mod_proxy_ajp, or mod_proxy_http with Apache HTTPD. Or you can shut down your Apache web server and change Tomcat to run on port 80.

Hope that helps.

/mde/

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


RE: Tomcat6/7 virtual hosting - yet again

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Dennis de Champeaux [mailto:atlantisician@yahoo.com] 
> Subject: Re: Tomcat6/7 virtual hosting - yet again

> Let add that Tomcat was  responding on port 8080 with out 
> of the box server.xml.

As expected.  What makes you think it will magically respond on port 80?  (Especially since you have httpd listening on port 80.)

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


Re: Tomcat6/7 virtual hosting - yet again

Posted by Hassan Schroeder <ha...@gmail.com>.
On Mon, Jun 20, 2011 at 2:07 PM, Dennis de Champeaux
<at...@yahoo.com> wrote:
> Let add that Tomcat was  responding on port 8080 with out of the box server.xml.

So you pretty obviously need to continue to use port 8080, eh?

e.g. http://www.testzzz.com:8080/

or turn off the Apache httpd running on port 80 and change your TC
connector configuration....

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

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


Re: Tomcat6/7 virtual hosting - yet again

Posted by Dennis de Champeaux <at...@yahoo.com>.
Let add that Tomcat was  responding on port 8080 with out of the box server.xml.

----------------------------------------------------------------------------------------

Home page:                          rs6.risingnet.net/~ddcc

Health Info Anytime for Everyone:   www.HealthCheck4Me.info

Exercise for the Mind:              www.SuDoKuChallenge.us

Marketing site:                     www.OntoOO.com

            >>  Do NOT buy Dell, Mac, Ford, Chrysler  <<

            >>         Boycott Chinese Products       <<

--- On Mon, 6/20/11, Hassan Schroeder <ha...@gmail.com> wrote:

From: Hassan Schroeder <ha...@gmail.com>
Subject: Re: Tomcat6/7 virtual hosting - yet again
To: "Tomcat Users List" <us...@tomcat.apache.org>
Date: Monday, June 20, 2011, 1:13 PM

On Mon, Jun 20, 2011 at 12:58 PM, Dennis de Champeaux
<at...@yahoo.com> wrote:
> This is my 4th day trying to setup virtual hosting on Linux-Debian;

> Yes I have read everything that I can find in Tomcat documentation -

> Using a browser (on that box) to access that bogus domain
> www.testzzz.com "works" but gives an unexpected response:

>    Apache/2.2.9 (Debian) Server at www.testzzz.com Port 80

Uh, "unexpected" because that's obviously not a Tomcat server at all
that you're accessing, or something else?  :-)

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

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


Re: Tomcat6/7 virtual hosting - yet again

Posted by Dennis de Champeaux <at...@yahoo.com>.
TX, for the quick response:
>Uh, "unexpected" because that's obviously not a Tomcat server at all
>that you're accessing, or something else?  :-)
                             And what would be the fix ?

----------------------------------------------------------------------------------------

Home page:                          rs6.risingnet.net/~ddcc

Health Info Anytime for Everyone:   www.HealthCheck4Me.info

Exercise for the Mind:              www.SuDoKuChallenge.us

Marketing site:                     www.OntoOO.com

            >>  Do NOT buy Dell, Mac, Ford, Chrysler  <<

            >>         Boycott Chinese Products       <<

--- On Mon, 6/20/11, Hassan Schroeder <ha...@gmail.com> wrote:

From: Hassan Schroeder <ha...@gmail.com>
Subject: Re: Tomcat6/7 virtual hosting - yet again
To: "Tomcat Users List" <us...@tomcat.apache.org>
Date: Monday, June 20, 2011, 1:13 PM

On Mon, Jun 20, 2011 at 12:58 PM, Dennis de Champeaux
<at...@yahoo.com> wrote:
> This is my 4th day trying to setup virtual hosting on Linux-Debian;

> Yes I have read everything that I can find in Tomcat documentation -

> Using a browser (on that box) to access that bogus domain
> www.testzzz.com "works" but gives an unexpected response:

>    Apache/2.2.9 (Debian) Server at www.testzzz.com Port 80

Uh, "unexpected" because that's obviously not a Tomcat server at all
that you're accessing, or something else?  :-)

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

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


Re: Tomcat6/7 virtual hosting - yet again

Posted by Hassan Schroeder <ha...@gmail.com>.
On Mon, Jun 20, 2011 at 12:58 PM, Dennis de Champeaux
<at...@yahoo.com> wrote:
> This is my 4th day trying to setup virtual hosting on Linux-Debian;

> Yes I have read everything that I can find in Tomcat documentation -

> Using a browser (on that box) to access that bogus domain
> www.testzzz.com "works" but gives an unexpected response:

>    Apache/2.2.9 (Debian) Server at www.testzzz.com Port 80

Uh, "unexpected" because that's obviously not a Tomcat server at all
that you're accessing, or something else?  :-)

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

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