----- Original Message -----

> From: Dennis de Champeaux <atlantisic...@yahoo.com>
> To: users@tomcat.apache.org
> Cc: dennis <d...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to