<!--
  -- Virtual hosting
  -->
<caucho.com>
  <log id='/caucho.com/tcp-server' href='stderr:'/>

  <http-server app-dir='doc' class-update-interval='2'>
    <!--
      -- Configures the listening port.
      -->
    <http port='8080'/>

    <!--
      -- Configuration at the outer level is for the default host -->
      -->
    <error-log id='log/default-error.log'/>
    <servlet-mapping url-pattern='/hello' servlet-name='test.HelloWorld'/>

    <!--
      -- Each virtual host has its own applications, sessions, and servlets.
      -- You must duplicate the configuration for each host.  Each host
      -- ignores the configuration in the outer block.
      -->

    <host id='vhost1.acme.com' app-dir='/web/vhost1' class-update-interval='2'>
      <error-log id='log/vhost1-error.log'/>
      <servlet-mapping url-pattern='/hello' servlet-name='test.HelloWorld'/>
    </host>

    <!--
      -- vhost2 does not recognize /hello as a servlet
      -->
    <host id='vhost2.acme.com' app-dir='/web/vhost2' class-update-interval='2'>
      <error-log id='log/vhost2-error.log'/>
      <servlet-mapping url-pattern='/goodbye' servlet-name='test.Goodbye'/>
    </host>

    <!--
      -- hosts can also have ports
      -->
    <host id='vhost2.acme.com:8080'
          app-dir='/web/vhost2_8080'
          class-update-interval='2'>
      <error-log id='log/vhost2-error.log'/>
      <servlet-mapping url-pattern='/goodbye' servlet-name='test.Goodbye'/>
    </host>
  </http-server>
</caucho.com>
