You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sean Pritchard <sp...@buildnet.com> on 2001/05/08 16:11:05 UTC

Virtual hosting on different ports

Hi,

I'm trying to set up virtual hosting based on the port a request came in on
(i.e. if the request is on port 80, one context is returned, port 5150
results in another).  I tried the settings below in my server.xml file but
my requests to the 5150 port were routed to the context at port 80.  Does
anyone have any suggestions for how to make this work?

Thanks,
Sean
 
<!-- Normal HTTP -->
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler" 
 
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
            <Parameter name="port" 
                value="80"/>
        </Connector>
	  <!-- Normal HTTP port 5150 -->
        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler" 
 
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
            <Parameter name="port" 
                value="5150"/>
        </Connector>


        <Host name="127.0.0.1" >
           <Context path="" 
                    docBase="webapps/ipaddress127" />
        </Host>
	  <Host name="127.0.0.1:5150" >
           <Context path="" 
                    docBase="webapps/ipaddress127-5150" />
        </Host>
        
____________________
Sean Pritchard
spritchard@buildnet.com
(919) 941-4201
fax (919) 941-4188
.....................................
facilis venire, facilis exire