Hi!

I'm trying to setup virtual hosts for my single tomcat webserver. I've
got the following setup: Apache Tomcat 7.0.32 running on a server with
one IP address. I forward any requests coming in on port 80 to port
8080 and from 443 to 8443 with a firewall rule. I have 2 domains and I
would like to run these two domains on the same Tomcat machine.
Therefore I had a look at the virtual host concept.

I found the following tutorial (very old) on the web:
http://onjava.com/pub/a/onjava/2006/08/30/publishing-multiple-sites-using-single-tomcat.html

and I payed attention to the offical Tomcat documentation in regard of this:
http://tomcat.apache.org/tomcat-7.0-doc/virtual-hosting-howto.html

So I made the following:
1. In my $CATALINA_HOME (which is /opt/apache-tomcat-7.0.32) I created
the folder "my2ndDomain"

2. Then I copied the war file I'd like to deploy into the folder and
renamed it. Such that now I have the following file in my folder
/opt/apache-tomcat-7.0.32/my2ndDomain/ROOT.war

3. Then I modified my "/opt/apache-tomcat-7.0.32/conf/server.xml" the
following way:
        <Host name="localhost"  appBase="webapps" unpackWARs="true"
autoDeploy="true">
        <Host name="wettprofi" appBase="my2ndDomain" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
                <Alias>my2ndDomain.com</Alias>
                <Alias>www.my2ndDomain.com</Alias>
                <Context path="my2ndDomain" debug="0" reloadable="false"/>
        </Host>
4. I restarted my Tomcat but nothing happened, entering
www.my2ndDomain.com was routed to the standard first domain running.

I'm wondering what I am doing wrong here.

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

Reply via email to