随笔 - 298  文章 - 377  trackbacks - 0
<2012年6月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

常用链接

留言簿(34)

随笔分类

随笔档案

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜

<!--
   - 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:properties path="cloud:/resin.properties"
                    optional
="true" recover="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:import path="cloud:/admin-users.xml" optional="true" recover="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> -->



  
<!--
     - 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">
        
<http id="" port="8080"/>
    
</server-multi>


    
<host-default>
      
<!-- creates the webapps directory for .war expansion -->
      
<web-app-deploy path="webapps"
                      expand-preserve-fileset
="WEB-INF/work/**"
                      multiversion-routing
="${webapp_multiversion_routing}"/>
    
</host-default>

    
<!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
    
<host-deploy path="hosts"/>

    
<!-- the default host, matching any host name -->
    
<host id="" root-directory=".">
      
<!--
         - webapps can be overridden/extended in the resin.xml
        
-->
      
<web-app id="/" root-directory="webapps/ROOT"/>
      
      
<resin:if test="${resin_doc}">
        
<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
      
</resin:if>

      
<web-app id="/sp" root-directory="F:/develop/Java/provision/web"/>
    
</host>
  
</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>

  
<cluster id="memcached" xmlns:memcache="urn:java:com.caucho.memcache">
    
<!-- define the servers in the cluster -->
    
<server-multi id-prefix="memcached-" address-list="${memcached_servers}" port="6820">
      
<!-- listen for the memcache protocol -->
      
<listen port="${memcached_port?:11211}"
              keepalive-timeout
="600s" socket-timeout="600s">
        
<memcache:MemcachedProtocol/>
      
</listen>
    
</server-multi>
  
</cluster>

   
<cluster id="app-1">
     
<!-- sets the content root for the cluster, relative to server.root -->
     
<root-directory>.</root-directory>
 
    
<resin:import path="${resin.home}/conf/app-default.xml"/>

    
<!-- configures a deployment directory for virtual hosts -->
     
<host-deploy path="hosts">
       
<host-default>
          
<access-log path="logs/app1-access.log"
             format
='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
             rollover-period
="1D"/>
         
<resin:import path="host.xml" optional="true"/>
       
</host-default>
     
</host-deploy>
 
    
<server id="app1" port="6801">
       
<http id="" port="9010"/>
     
</server>
     
<host id="" root-directory=".">
     
<log name="" level="info" path="log/stdout_app1.log" timestamp="[%H:%M:%S.%s] "
      archive-format
="stdout_app1.log.%Y-%m-%d.gz"
      rollover-period
="1D"/>
 
      
<web-app id="/" root-directory="F:/develop/Java/provision/web"/>
     
</host>
   
</cluster>



   
<cluster id="app-2">
     
<!-- sets the content root for the cluster, relative to server.root -->
     
<root-directory>.</root-directory>
 
    
<resin:import path="${resin.home}/conf/app-default.xml"/>
 
    
<!-- configures a deployment directory for virtual hosts -->
     
<host-deploy path="hosts">
       
<host-default>
          
<access-log path="logs/app2-access.log"
             format
='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
             rollover-period
="1D"/>
         
<resin:import path="host.xml" optional="true"/>
       
</host-default>
     
</host-deploy>
 
    
<server id="app2" port="6802">
       
<http id="" port="9020"/>
     
</server>
     
<host id="" root-directory=".">
     
<log name="" level="info" path="log/stdout_app2.log" timestamp="[%H:%M:%S.%s] "
      archive-format
="stdout_app2.log.%Y-%m-%d.gz"
      rollover-period
="1D"/>
 
      
<web-app id="/" root-directory="F:/develop/Java/provision/web"/>
     
</host>
   
</cluster>

  
<!--resin:set var="resin_admin_external" value="true"/--> 
</resin>


CMD:
resin cluster app gui
resin -server app1 start   or   resin -server app1 gui
resin -server app2 start   or   resin -server app2 gui

F:\develop\Java\resin\resin-pro-4.0.28>resin -cluster app start
Resin
/4.0.28 launching watchdog at 127.0.0.1:6600
Resin
/4.0.28 started with watchdog at 127.0.0.1:6600

F:\develop\Java\resin\resin
-pro-4.0.28>


posted on 2012-06-21 12:09 聂文龙 阅读(1178) 评论(1)  编辑 收藏 引用

FeedBack:
# re: Resin 4 2012-06-21 13:07 聂文龙
# resin.properties - configuration variable values
#
# See resin.xml, cluster-default.xml, and health.xml for full configuration.
# Any variable defined by ${...} can be set as a property in this file.
#
# Individual server overrides can be specified by prepending the server.id.
# For example, increasing the log level for an individual server:
#
# log_level : info
# app-0.log_level : finest
#
# Like Resin XML configuration, modification of this file will trigger a restart.
#

# General log level (modify resin.xml for more granular log level adjustments)
# log_level : finer

# Enable verbose browser error reporting
dev_mode : true

# Enable /resin-doc Resin documentation
resin_doc : true

# List Triad server ip-addresses:hmux-port for each tier, space separated
# App tier Triad servers must be listed to enable web-tier to app-tier load-balancing

# web-tier Triad servers: web-0 web-1 web-2
# web_servers :

# app-tier Triad servers: app-0 app-1 app-2
app_servers : 127.0.0.1:6800
app-1 : 127.0.0.1:6801
app-2 : 127.0.0.1:6802

# Configures Resin for a memcached server tier
# memcached-tier Triad servers: memcached-0 memcached-1 memcached-2
# memcached_servers :
# memcached_port : 11211

# Allow elastic nodes to join the cluster (enable for cloud mode)
# elastic_cloud_enable : true

# The cluster that elastic nodes should join - each will contact a Triad server
# Use a separate resin.properties file for each cluster
home_cluster : app
app1 : app-1
app2 : app-2

# Set HTTP and HTTPS bind address
# http_address : *

# Set HTTP and HTTPS ports.
# Use overrides for individual server control, for example: app-0.http : 8081
#http : 8080
app-0.http : 44405
app-1.http : 44406
app-2.http : 44407
# https : 8443

# For security, Resin can switch to a non-root user after binding to port 80
setuid_user :
setuid_group :

# Arg passed directly to the JVM
# jvm_args : -Xmx2048m -XX:MaxPermSize=256m

# Local URLs for the watchdog to check to ensure the server is up, space separated
# http_ping_urls : http://127.0.0.1/test.jsp

# Throttle the number of active threads for a port
port_thread_max : 256
accept_thread_max : 32
accept_thread_min : 4

# Enable JNI TCP speed optimizations
tcp_cork : true
sendfile : true

# OpenSSL certificate configuration
# Keys are typically stored in the resin configuration directory.
# openssl_file : keys/test.crt
# openssl_key : keys/test.key
# openssl_password : changeme

# JSSE certificate configuration
# Keys are typically stored in the resin configuration directory.
# jsse_keystore_type : jks
# jsse_keystore_file : /etc/resin/keys/server.keystore
# jsse_keystore_password : changeme

# In absence of a signed certificate, Resin will fallback to using a
# self-signed development certificate if HTTPS is enabled

# Enable the proxy-cache - for caching static content in memory
proxy_cache_enable: false

# Sets the proxy cache memory size
# proxy_cache_size : 256m

# Enable clustered persistent sessions (for failover)
session_store : true

# Web-apps named with numeric suffixes, e.g. foo-10.0.war and can be browsed as
# /foo. When a new version of the web-app is deployed, Resin continues to route
# active session requests to the previous web-app version while new sessions
# go to the new version, so users will not be aware of the application upgrade.
# webapp_multiversion_routing : true

# Set the email address to receive weekly and restart PDF reports
# email : admin@example.com

# Set a global password to prevent foreign Resin instances from connecting.
# Must be identical between web, app, and cache clusters.
# cluster_system_key : changeme

# Enable command-line remote admin (required for remote deploy)
# remote_cli_enable : true

# Enable /resin-admin web administration console
web_admin_enable : true

# Permit access to /resin-admin from non-local network ip-addresses
# web_admin_external : true

# Require HTTPS to access /resin-admin
# web_admin_ssl : true

# Enable Resin REST Admin
# rest_admin_enable : true

# Require SSL for REST Admin
# rest_admin_ssl : true

# Access to /resin-admin and remote CLI is password restricted.
# Use "resinctl generate-password" and copy/paste here to set the admin
admin_user : admin
admin_password : {SSHA}xxxxxxxx

# Enable reading EC2 user data as resin properties
# properties_import_url : http://169.254.169.254/latest/user-data

#admin_external : true
#admin_secure : true  回复  更多评论
  

只有注册用户登录后才能发表评论。
【推荐】超50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理