resin.xml 5.75 KB
<!--
   - Resin 4.0 configuration file.
  -->
<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="urn:java:com.caucho.resin">

  <!-- property-based Resin configuration -->
  <resin:properties path="${__DIR__}/resin.properties" optional="true"/>

  <resin:if test="${properties_import_url}">
     <resin:properties path="${properties_import_url}"
                    optional="true" recover="true"/>
  </resin:if>


  <!-- Logging configuration for the JDK logging API -->
  <log-handler name="" level="all" path="stdout:"
               timestamp="[%y-%m-%d %H:%M:%S.%s]"
               format=" {${thread}} ${log.message}"/>
               
  <!-- 
     - Alternative pseudo-TTCC log format
     -
     - <log-handler name="" level="all" path="stdout:"
     -           timestamp="%y-%m-%d %H:%M:%S.%s"
     -           format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
    -->
   
  <!--
     - level='info' for production
     - 'fine' or 'finer' for development and troubleshooting
    -->
  <logger name="" level="${log_level?:'info'}"/>

  <logger name="com.caucho.java" level="config"/>
  <logger name="com.caucho.loader" level="config"/>

  <!--
     - Default configuration applied to all clusters, including
     - HTTP, HTTPS, and /resin-admin configuration.
    -->
  <resin:import path="${__DIR__}/cluster-default.xml"/>
  
  <!--
     - health configuration
    -->
  <resin:import path="${__DIR__}/health.xml"/>

  
  <!--
     - Remote management requires at least one enabled admin user.
    -->
  <resin:AdminAuthenticator>
    <user name="${admin_user}" password="${admin_password}"/>
    
    <resin:import path="${__DIR__}/admin-users.xml" optional="true"/>
  </resin:AdminAuthenticator>

  <!--
     - For clustered systems, create a password in as cluster_system_key
    -->
  <cluster-system-key>${cluster_system_key}</cluster-system-key>

  <!--
     - For production sites, change dependency-check-interval to something
     - like 600s, so it only checks for updates every 10 minutes.
    -->
  <dependency-check-interval>${dependency_check_interval?:'2s'}</dependency-check-interval>

  <!-- For resin.properties dynamic cluster joining -->
  <home-cluster>${home_cluster}</home-cluster>
  <home-server>${home_server}</home-server>
  <elastic-server>${elastic_server}</elastic-server>
  <elastic-dns>${elastic_dns}</elastic-dns>

  <!--
     - JSSE default properties
    -->
  <system-property
    jdk.tls.ephemeralDHKeySize="2048"
    jdk.tls.rejectClientInitiatedRenegotiation="false"
    sun.security.ssl.allowUnsafeRenegotiation="true"
    sun.security.ssl.allowLegacyHelloMessages="true"/>
     

  <!--
     - Configures the main application cluster.  Load-balancing configurations
     - will also have a web cluster.
    -->
  <cluster id="app">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="app-" address-list="${app_servers}" port="6800">
	    <watchdog-port>6600</watchdog-port>
    </server-multi>

    <host-default>
		<web-app-default>
			<session-config>
				<session-max>16686</session-max>
				<session-timeout>720</session-timeout>
				<enable-cookies>true</enable-cookies>
				<enable-url-rewriting>true</enable-url-rewriting>
				<always-load-session>true</always-load-session>
				<reuse-session-id>false</reuse-session-id>
			</session-config>
			<!--<cookie-http-only/>-->
		</web-app-default>
      <!-- creates the webapps directory for .war expansion -->
      <web-app-deploy path="webapps"
                      expand-preserve-fileset="WEB-INF/work/**"
                      multiversion-routing="${webapp_multiversion_routing}"
                      path-suffix="${elastic_webapp?resin.id:''}"/>
	  <character-encoding>UTF-8</character-encoding>
    </host-default>

    <!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
    <host-deploy path="hosts">
      <host-default>
        <resin:import path="host.xml" optional="true"/>
      </host-default>
    </host-deploy>

	<!--
     - You can change the compiler to "javac", "eclipse" or "internal".
	    <javac compiler="D:\weavernow\JDK\bin\javac" args="-encoding UTF-8"/>

    -->


    <!-- the default host, matching any host name -->
   <host id="" root-directory=".">

   <access-log path="logs/access.log" archive-format="access-%Y%m%d.log.gz" format='%{loginidweaver}c` %D` %h` %n` %u` "%t"` "%r"`  "%{Referer}i"' rollover-period="1D">
	   <exclude>\.gif$</exclude>
	   <exclude>\.jpg$</exclude>
	   <exclude>\.png$</exclude>
	   <exclude>\.js$</exclude>
	   <exclude>\.css$</exclude>
	   <exclude>\.html$</exclude>
	   <exclude>\.htm$</exclude>
	   <exclude>\.swf$</exclude>
	   <exclude>\.cur$</exclude>
	</access-log>

	<stdout-log path="log/stdout.log" archive-format="stdout-%Y%m%d.log.gz" timestamp="[%Y.%m.%d %H:%M:%S.%s]" rollover-period="1D"/>
	<stderr-log path="log/stderr.log" archive-format="stderr-%Y%m%d.log.gz" timestamp="[%Y.%m.%d %H:%M:%S.%s]" rollover-period="1D"/>

      <!--
         - webapps can be overridden/extended in the resin.xml
        -->
      <web-app id="/" root-directory="D:\weavernow\ecology">
			<servlet-mapping url-pattern='/weaver/*' servlet-name='invoker'/>
			<form-parameter-max>100000</form-parameter-max>
      </web-app>

    </host>
      
    <resin:if test="${resin_doc}">
      <host id="${resin_doc_host}" root-directory="${resin_doc_host}">
        <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
      </host>
    </resin:if>
	<session-cookie>ecology_JSessionid</session-cookie>
  </cluster>

  <cluster id="web">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="web-" address-list="${web_servers}" port="6810"/>

    <host id="" root-directory="web">
      <web-app id="">
        <resin:LoadBalance regexp="" cluster="app"/>
      </web-app>
    </host>
  </cluster>

</resin>