<?xml version="1.0" encoding="UTF-8"?>
<virtualHostConfig>
    <docRoot>$VH_ROOT/html/</docRoot>
    <fcgiList>
        <fcgi>
            <name>echocpp</name>
            <address>localhost:5559</address>
            <type>local</type>
            <instances>4</instances>
            <maxConns>4</maxConns>
            <path>$SERVER_ROOT/fcgi-bin/lt-echo-cpp</path>
        </fcgi>
        <fcgi>
            <name>php</name>
            <address>localhost:5558</address>
            <backLog>20</backLog>
            <type>local</type>
            <path>$SERVER_ROOT/fcgi-bin/php-cgi</path>
            <instances>1</instances>
            <maxConns>20</maxConns>
            <env>PHP_FCGI_CHILDREN=20</env>
            <env>PHP_FCGI_MAX_REQUESTS=1000</env>
        </fcgi>
    </fcgiList>
    <servletEngineList>
        <servletEngine>
            <name>tomcat1</name>
            <address>localhost:8009</address>
            <maxConns>20</maxConns>
            <env>ENV1=VAL1</env>
            <env>ENV2=VAL2</env>
        </servletEngine>
    </servletEngineList>
     <contextList>
         <context>
             <uri>/cgi-bin/</uri>
             <root>$VH_ROOT/cgi-bin/</root>
             <handlerType>cgi</handlerType>
             <allowBrowse>0</allowBrowse>
         </context>
         <context>
             <uri>/fcgi-bin/echo</uri>
             <root>echocpp</root>
             <handlerType>fcgi</handlerType>
         </context>
         <context>
             <uri>/fcgi-bin/php</uri>
             <root>php</root>
             <address>localhost:5558</address>
             <handlerType>fcgi</handlerType>
         </context>
         <context>
             <uri>/private/</uri>
             <root>protected/</root>
             <handlerType>NULL</handlerType>
             <allowBrowse/>
             <realm>RistrictedArea</realm>
         </context>
         <context>
             <uri>/redirauth/</uri>
             <root>/private/</root>
             <handlerType>redirect</handlerType>
         </context>
         <context>
             <uri>/redirect/</uri>
             <root>/test</root>
             <handlerType>redirect</handlerType>
         </context>
         <context>
             <uri>/redirabs/</uri>
             <root>http:/index.html</root>
             <handlerType>redirect</handlerType>
         </context>
         <context>
             <uri>/redircgi/</uri>
             <root>/cgi-bin/</root>
             <handlerType>redirect</handlerType>
         </context>
     </contextList>
     <scriptHandlerList>
         <scriptHandler>
            <suffix>php</suffix>
            <handlerContext>/fcgi-bin/php</handlerContext>
         </scriptHandler>
         <scriptHandler>
            <suffix>jsp</suffix>
            <handlerContext>/*.jsp</handlerContext>
         </scriptHandler>
     </scriptHandlerList>
     <indexFileList>
        <indexFile>index.php</indexFile>
        <indexFile>index.html</indexFile>
        <indexFile>index.htm</indexFile>
        <indexFile>default.html</indexFile>
     </indexFileList>
     <customErrorPages>
         <errorPage>
             <errCode>404</errCode>
             <url>/error404.html</url>
         </errorPage>
     </customErrorPages>
     <security>
         <accessControl>
             <allow>*</allow>
             <deny>192.168.1.*,192.168.128.5/255.255.128.0,102.11.1.1</deny>
         </accessControl>
         <realmList>
             <realm>
                 <name>RistrictedArea</name>
                 <userDB>
                    <type>file</type>
                    <location>$VH_ROOT/conf/htpasswd</location>
                 </userDB>
             </realm>
         </realmList>
     </security>
     <logging>
          <log>
              <fileName>$VH_ROOT/logs/error.log</fileName>
              <logLevel>DEBUG</logLevel>
          </log>
          <accessLog>
              <fileName>$VH_ROOT/logs/access.log</fileName>
              <keepDays>90</keepDays>
          </accessLog>
      </logging>
     
</virtualHostConfig>
