So here's what I entered in my server.xml file based on various pieces of
advice:

        <Service name="instance1">
            <Connector port="9091" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
                <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
                <Engine name="Standalone" defaultHost="devlocal1" debug="0">
                        <Host name="devlocal1" debug="0" 
appBase="webapps/devlocal1"
unpackWARs="true" autoDeploy="true">
                                <Logger 
className="org.apache.catalina.logger.FileLogger"
directory="logs"  prefix="devlocal1" suffix=".txt" timestamp="true" />
                                <Cluster 
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" />
                        </Host>
                </Engine>
        </Service>

        <Service name="instance2">
            <Connector port="9092" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
                <Connector port="8011" protocol="AJP/1.3" redirectPort="8443" />
                <Engine name="Standalone" defaultHost="devlocal2" debug="0">
                        <Host name="devlocal2" debug="0" 
appBase="webapps/devlocal2"
unpackWARs="true" autoDeploy="true">
                                <Logger 
className="org.apache.catalina.logger.FileLogger"
directory="logs"  prefix="devlocal2" suffix=".txt" timestamp="true" />
                                <Cluster 
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster" />
                        </Host>
                </Engine>
        </Service>

and here's what's in my hosts file:

127.0.0.1     localhost
::1             localhost
127.0.0.1       devlocal1
127.0.0.1       devlocal2

When I try to hit either http://devlocal1/ or http://localhost:9091/ this is
what I get in my browser (and yes, Tomcat was restarted)

Failed to Connect
Firefox can't establish a connection to the server at revfoodslocal:9091.

- Dylan


Caldarale, Charles R wrote:
> 
>> From: dylanmac [mailto:[EMAIL PROTECTED]
>> Subject: Re: Multiple development sites using different ports
>>
>> I looked at name-based virtual hosts and couldn't get it
>> working.
> 
> What did you try and what didn't work?  Be specific.
> 
> Did you read the doc:
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html
> 
>> I need to configure the DNS properly for
>> name-based virtual hosting to work.
> 
> Only if you're going to expose your web sites to an uncontrolled set of
> clients (e.g., the Internet).  Otherwise, as Hassan noted, simply update
> the /etc/hosts file on each client computer to include all the host names
> you want, all targeting the same IP address.  (For Windows clients, it's
> in C:\WINDOWS\system32\drivers\etc\hosts.)
> 
>  - 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multiple-development-sites-using-different-ports-tp18139932p18163389.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to