|
@@ -0,0 +1,333 @@
|
|
|
+<!--
|
|
|
+ - Resin 3.1 configuration file.
|
|
|
+ -->
|
|
|
+<resin xmlns="http://caucho.com/ns/resin"
|
|
|
+ xmlns:resin="http://caucho.com/ns/resin/core">
|
|
|
+
|
|
|
+ <!-- adds all .jar files under the resin/lib directory -->
|
|
|
+ <class-loader>
|
|
|
+ <tree-loader path="${resin.home}/ext-lib"/>
|
|
|
+ <tree-loader path="${resin.root}/ext-lib"/>
|
|
|
+
|
|
|
+ <tree-loader path="${resin.home}/lib"/>
|
|
|
+ <tree-loader path="${resin.root}/lib"/>
|
|
|
+ </class-loader>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Management configuration
|
|
|
+ -
|
|
|
+ - Remote management requires at least one enabled admin user.
|
|
|
+ -->
|
|
|
+ <management path="${resin.root}/admin">
|
|
|
+ <user name="admin" password="password" disable="true"/>
|
|
|
+
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <deploy-service/>
|
|
|
+ <jmx-service/>
|
|
|
+ <log-service/>
|
|
|
+ <xa-log-service/>
|
|
|
+ </resin:if>
|
|
|
+ </management>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Logging configuration for the JDK logging API.
|
|
|
+ -->
|
|
|
+ <log name="" level="info" path="stdout:"
|
|
|
+ timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
|
|
|
+ <log name='' level='fine' path='stderr:' timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
|
|
|
+ <!--
|
|
|
+ - 'info' for production
|
|
|
+ - 'fine' or 'finer' for development and troubleshooting
|
|
|
+ -->
|
|
|
+ <logger name="com.caucho" level="info"/>
|
|
|
+
|
|
|
+ <logger name="com.caucho.java" level="config"/>
|
|
|
+ <logger name="com.caucho.loader" level="config"/>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - For production sites, change dependency-check-interval to something
|
|
|
+ - like 600s, so it only checks for updates every 10 minutes.
|
|
|
+ -->
|
|
|
+ <dependency-check-interval>2s</dependency-check-interval>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - SMTP server for sending mail notifications
|
|
|
+ -->
|
|
|
+ <!--
|
|
|
+ <system-property mail.smtp.host="127.0.0.1"/>
|
|
|
+ <system-property mail.smtp.port="25"/>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Sets the default character encoding to utf-8
|
|
|
+ -
|
|
|
+ - <character-encoding>utf-8</character-encoding>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - You can change the compiler to "javac", "eclipse" or "internal".
|
|
|
+ -->
|
|
|
+ <javac compiler="internal" args="-source 1.5"/>
|
|
|
+
|
|
|
+ <!-- Security providers.
|
|
|
+ - <security-provider>
|
|
|
+ - com.sun.net.ssl.internal.ssl.Provider
|
|
|
+ - </security-provider>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!-- Uncomment to use Resin's XML implementations
|
|
|
+ -
|
|
|
+ - <system-property javax.xml.parsers.DocumentBuilderFactory
|
|
|
+ - ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
|
|
|
+ - <system-property javax.xml.parsers.SAXParserFactory
|
|
|
+ - ="com.caucho.xml.parsers.XmlSAXParserFactory"/>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <cluster id="app-tier">
|
|
|
+ <!-- sets the content root for the cluster, relative to server.root -->
|
|
|
+ <root-directory>.</root-directory>
|
|
|
+
|
|
|
+ <server-default>
|
|
|
+ <!-- The http port -->
|
|
|
+ <http address="*" port="8080"/>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - SSL port configuration:
|
|
|
+ -
|
|
|
+ - <http address="*" port="8443">
|
|
|
+ - <openssl>
|
|
|
+ - <certificate-file>keys/gryffindor.crt</certificate-file>
|
|
|
+ - <certificate-key-file>keys/gryffindor.key</certificate-key-file>
|
|
|
+ - <password>test123</password>
|
|
|
+ - </openssl>
|
|
|
+ - </http>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - The JVM arguments
|
|
|
+ -->
|
|
|
+ <jvm-arg>-server</jvm-arg>
|
|
|
+ <jvm-arg>-Xmx1536m</jvm-arg>
|
|
|
+ <jvm-arg>-Xms1536m</jvm-arg>
|
|
|
+ <jvm-arg>-Xmn256m</jvm-arg>
|
|
|
+ <jvm-arg>-Xss1m</jvm-arg>
|
|
|
+ <jvm-arg>-XX:PermSize=128m</jvm-arg>
|
|
|
+ <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
|
|
|
+
|
|
|
+ <jvm-arg>-XX:+PrintGCDetails</jvm-arg>
|
|
|
+ <jvm-arg>-Xloggc:jvm.log</jvm-arg>
|
|
|
+ <jvm-arg>-XX:ParallelGCThreads=8</jvm-arg>
|
|
|
+ <jvm-arg>-XX:+UseConcMarkSweepGC</jvm-arg>
|
|
|
+ <!--<jvm-arg>-XX:CMSFullGCsBeforeCompaction=5</jvm-arg>
|
|
|
+ <jvm-arg>-XX:+UseCMSCompactAtFullCollection</jvm-arg>
|
|
|
+ <jvm-arg>-XX:+UseCMSInitiatingOccupancyOnly</jvm-arg>
|
|
|
+ <jvm-arg>-XX:CMSInitiatingOccupancyFraction=70</jvm-arg>
|
|
|
+ -->
|
|
|
+<!--
|
|
|
+ <jvm-arg>-Xincgc</jvm-arg>
|
|
|
+-->
|
|
|
+ <jvm-arg>-Xdebug</jvm-arg>
|
|
|
+ <jvm-arg>-Dnetworkaddress.cache.ttl=-1</jvm-arg>
|
|
|
+
|
|
|
+ <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
|
|
|
+ <jvm-arg>-Dcom.sun.management.jmxremote.port=9889</jvm-arg>
|
|
|
+ <jvm-arg>-Dcom.sun.management.jmxremote.authenticate=true</jvm-arg>
|
|
|
+ <jvm-arg>-Dcom.sun.management.jmxremote.password.file=/app/soft/resin-pro-3.1.6/jconsole_pwd/jmxremote.password</jvm-arg>
|
|
|
+ <jvm-arg>-Dcom.sun.management.jmxremote.ssl=false</jvm-arg>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Uncomment to enable admin heap dumps
|
|
|
+ - <jvm-arg>-agentlib:resin</jvm-arg>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - arguments for the watchdog process
|
|
|
+ -->
|
|
|
+ <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
|
|
|
+ <watchdog-port>9600</watchdog-port>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Configures the minimum free memory allowed before Resin
|
|
|
+ - will force a restart.
|
|
|
+ -->
|
|
|
+ <memory-free-min>1M</memory-free-min>
|
|
|
+
|
|
|
+ <!-- Maximum number of threads. -->
|
|
|
+ <thread-max>350</thread-max>
|
|
|
+
|
|
|
+ <!-- Configures the socket timeout -->
|
|
|
+ <socket-timeout>15s</socket-timeout>
|
|
|
+
|
|
|
+ <!-- Configures the keepalive -->
|
|
|
+ <keepalive-max>300</keepalive-max>
|
|
|
+ <keepalive-timeout>15s</keepalive-timeout>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - If starting bin/resin as root on Unix, specify the user name
|
|
|
+ - and group name for the web server user.
|
|
|
+ -
|
|
|
+ - <user-name>resin</user-name>
|
|
|
+ - <group-name>resin</group-name>
|
|
|
+ -->
|
|
|
+ </server-default>
|
|
|
+
|
|
|
+ <!-- define the servers in the cluster -->
|
|
|
+ <server id="" address="127.0.0.1" port="6800" load-balance-socket-timeout="600s"/>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Configures the persistent store for single-server or clustered
|
|
|
+ - in Resin professional.
|
|
|
+ -->
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <persistent-store type="cluster">
|
|
|
+ <init path="session"/>
|
|
|
+ </persistent-store>
|
|
|
+ </resin:if>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - For security, use a different cookie for SSL sessions.
|
|
|
+ - <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Enables the cache (available in Resin Professional)
|
|
|
+ -->
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <cache path="cache" memory-size="64M">
|
|
|
+ <!-- Vary header rewriting for IE -->
|
|
|
+ <rewrite-vary-as-private/>
|
|
|
+ </cache>
|
|
|
+ </resin:if>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Enables periodic checking of the server status and
|
|
|
+ - check for deadlocks..
|
|
|
+ -
|
|
|
+ - All servers can add <url>s to be checked.
|
|
|
+ -->
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <ping>
|
|
|
+ <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
|
|
|
+ </ping>
|
|
|
+ </resin:if>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Defaults applied to each web-app.
|
|
|
+ -->
|
|
|
+ <web-app-default>
|
|
|
+ <prologue>
|
|
|
+ <!--
|
|
|
+ - Extension library for common jar files. The ext is safe
|
|
|
+ - even for non-classloader aware jars. The loaded classes
|
|
|
+ - will be loaded separately for each web-app, i.e. the class
|
|
|
+ - itself will be distinct.
|
|
|
+ -->
|
|
|
+ <class-loader>
|
|
|
+ <tree-loader path="${resin.root}/ext-webapp-lib"/>
|
|
|
+ </class-loader>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Enable EL expressions in Servlet and Filter init-param
|
|
|
+ -->
|
|
|
+ <allow-servlet-el/>
|
|
|
+
|
|
|
+ <servlet-mapping servlet-class='com.caucho.servlets.ResinStatusServlet'>
|
|
|
+ <url-pattern>/resin-status</url-pattern>
|
|
|
+ <init enable="read"/>
|
|
|
+ </servlet-mapping>
|
|
|
+
|
|
|
+ </prologue>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Sets timeout values for cacheable pages, e.g. static pages.
|
|
|
+ -->
|
|
|
+ <cache-mapping url-pattern="/" expires="60m"/>
|
|
|
+ <cache-mapping url-pattern="/*.m" expires="60m"/>
|
|
|
+ <cache-mapping url-pattern="/i/*/*.gif" expires="7D"/>
|
|
|
+ <cache-mapping url-pattern="/i/*/*.jpg" expires="7D"/>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - for security, disable session URLs by default.
|
|
|
+ -->
|
|
|
+ <session-config>
|
|
|
+ <enable-url-rewriting>false</enable-url-rewriting>
|
|
|
+ <session-timeout>1</session-timeout>
|
|
|
+ <session-max>8192</session-max>
|
|
|
+ </session-config>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - For security, set the HttpOnly flag in cookies.
|
|
|
+ - <cookie-http-only/>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Some JSP packages have incorrect .tld files. It's possible to
|
|
|
+ - set validate-taglib-schema to false to work around these packages.
|
|
|
+ -->
|
|
|
+ <jsp>
|
|
|
+ <validate-taglib-schema>true</validate-taglib-schema>
|
|
|
+ <fast-jstl>true</fast-jstl>
|
|
|
+ <fast-jsf>false</fast-jsf>
|
|
|
+ </jsp>
|
|
|
+ </web-app-default>
|
|
|
+
|
|
|
+ <!-- includes the app-default for default web-app behavior -->
|
|
|
+ <resin:import path="${resin.home}/conf/app-default.xml"/>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Sample database pool configuration
|
|
|
+ -
|
|
|
+ - The JDBC name is java:comp/env/jdbc/test
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Default host configuration applied to all virtual hosts.
|
|
|
+ -->
|
|
|
+ <host-default>
|
|
|
+ <!--
|
|
|
+ - With another web server, like Apache, this can be commented out
|
|
|
+ - because the web server will log this information.
|
|
|
+ -->
|
|
|
+ <!-- <access-log path="logs/access.log"
|
|
|
+ format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
|
|
|
+ rollover-period="1W"/>
|
|
|
+ -->
|
|
|
+ <!-- creates the webapps directory for .war expansion -->
|
|
|
+ <web-app-deploy path="webapps"/>
|
|
|
+
|
|
|
+ <!-- creates the deploy directory for .ear expansion -->
|
|
|
+ <ear-deploy path="deploy">
|
|
|
+ <ear-default>
|
|
|
+ <ejb-server>
|
|
|
+ <config-directory>WEB-INF</config-directory>
|
|
|
+ </ejb-server>
|
|
|
+ </ear-default>
|
|
|
+ </ear-deploy>
|
|
|
+
|
|
|
+ <!-- creates the deploy directory for .rar expansion -->
|
|
|
+ <resource-deploy path="deploy"/>
|
|
|
+ </host-default>
|
|
|
+
|
|
|
+ <!-- configures a deployment directory for virtual hosts -->
|
|
|
+ <host-deploy path="hosts">
|
|
|
+ <host-default>
|
|
|
+ <resin:import path="host.xml" optional="true"/>
|
|
|
+ </host-default>
|
|
|
+ </host-deploy>
|
|
|
+
|
|
|
+ <!-- configures the default host, matching any host name -->
|
|
|
+ <host id="" root-directory=".">
|
|
|
+ <web-app id="/" character-encoding='UTF-8' document-directory="/data/duiba/webapps">
|
|
|
+ <stdout-log path="/data/log/resin-books/stdout.log" rollover-period="1W"/>
|
|
|
+ <stderr-log path="/data/log/resin-books/stderr.log" rollover-period='1W'/>
|
|
|
+ <access-log path='/data/log/resin-books/access.log'
|
|
|
+ format='%h{]%l{]%u{]%t{]"%r"{]%s{]%D{]%b{]"%{Referer}i"{]"%{User-Agent}i"{]"%{X-Forwarded-For}i"' rollover-size="1024mb" rollover-period='1D'/>
|
|
|
+ </web-app>
|
|
|
+ <web-app-deploy path="/data/duiba/webapps"/>
|
|
|
+ </host>
|
|
|
+ </cluster>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Configuration for the web-tier/load-balancer
|
|
|
+ -->
|
|
|
+</resin>
|