Can multiple servers wait on the same port?

satya - 8/12/2013 11:00:17 AM

Here is a discussion on sof

Here is a discussion on sof

satya - 8/12/2013 11:02:28 AM

quick summary

1. Either You have to have a master process that waits on a given port and then using a number of configurable criteria redirects packets to target processes much like a proxy server except that the target apps don't need to have ports at all.

2. Or have a proxy server that redirects requests to target servers that they themselves on other ports but exposes the main proxy port to the general public.

satya - 8/12/2013 11:03:08 AM

Both IIS and Apache can act as proxy servers for tomcat

Both IIS and Apache can act as proxy servers for tomcat

satya - 8/12/2013 11:20:22 AM

Here is tomcat docs on how to configure apache as a proxy server

Here is tomcat docs on how to configure apache as a proxy server

satya - 8/12/2013 11:22:28 AM

Here are virtual hosting docs on tomcat

Here are virtual hosting docs on tomcat

If virtual hosting works for your need, this is the page for the docs of virtual hosting.

satya - 8/12/2013 11:51:40 AM

Here is a virtual host configuration that might work....


<Service....>
    <Connector port="80" address="your-ip" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
               
    <Engine name="Catalina" defaultHost="your-ip">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <Host name="your-ip"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

            <Alias>knowledgefolders.com</Alias>
          	<Alias>www.knowledgefolders.net</Alias>
    		<Alias>site2</Alias>
    		....
    		<Alias>siten</Alias>

            <Context path="" docBase="d:/somepath/akc" debug="0"/>
            <Context path="/akc" docBase="d:/somepath/akc" debug="0"/>
      </Host>
      
      <!--Host names and alias names likely need to be different -->
      <host name="new-domain-host1" ...>
          <alias...../>
          <alias .....>
      </host>

      <!--Host names and alias names likely need to be different -->
      <host name="new-domain-host2" ...>
          <alias...../>
          <alias .....>
      </host>
   </Engine>
  </Service>