resin4的初次配置與使用

來源:互聯網
上載者:User

標籤:

之前用的resin3,結果發布新項目老師檔案衝突,我也找不到是哪裡有問題,於是嘗試使用resin4.

首先從官網下載最新resin4。

然後放到opt下,tar -zvxf 解壓。

然後修改conf/resin.xml。

最終修改如下:  1 <!--  2 - Resin 4.0 configuration file.

 3 --> 4 <resin xmlns="http://caucho.com/ns/resin" 5 xmlns:resin="urn:java:com.caucho.resin"> 6  7 <!-- property-based Resin configuration --> 8 <resin:properties path="${__DIR__}/resin.properties" optional="true"/> 9  10 <resin:if test="${properties_import_url}"> 11 <resin:properties path="${properties_import_url}" 12 optional="true" recover="true"/> 13 </resin:if> 14  15  16 <!-- Logging configuration for the JDK logging API --> 17 <log-handler name="" level="all" path="stdout:" 18 timestamp="[%y-%m-%d %H:%M:%S.%s]" 19 format=" {${thread}} ${log.message}"/> 20  21 <!--  22 - Alternative pseudo-TTCC log format 23 - 24 - <log-handler name="" level="all" path="stdout:" 25 - timestamp="%y-%m-%d %H:%M:%S.%s" 26 - format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/> 27 --> 28  29 <!-- 30 - level=‘info‘ for production 31 - ‘fine‘ or ‘finer‘ for development and troubleshooting 32 --> 33 <logger name="" level="${log_level?:‘info‘}"/> 34  35 <logger name="com.caucho.java" level="config"/> 36 <logger name="com.caucho.loader" level="config"/> 37  38 <!-- 39 - Default configuration applied to all clusters, including 40 - HTTP, HTTPS, and /resin-admin configuration. 41 --> 42 <resin:import path="${__DIR__}/cluster-default.xml"/> 43  49  50  51  52 <!-- 53 - Remote management requires at least one enabled admin user. 54 --> 55 <resin:AdminAuthenticator> 56 <user name="${admin_user}" password="${admin_password}"/> 57  58 <resin:import path="${__DIR__}/admin-users.xml" optional="true"/> 59 </resin:AdminAuthenticator> 60  61 <!-- 62 - For clustered systems, create a password in as cluster_system_key 63 --> 64 <cluster-system-key>${cluster_system_key}</cluster-system-key> 65  66 <!-- 67 - For production sites, change dependency-check-interval to something 68 - like 600s, so it only checks for updates every 10 minutes. 69 --> 70 <dependency-check-interval>${dependency_check_interval?:‘2s‘}</dependency-check-interval> 71  72 <!-- For resin.properties dynamic cluster joining --> 73 <home-cluster>${home_cluster}</home-cluster> 74 <home-server>${home_server}</home-server> 75 <elastic-server>${elastic_server}</elastic-server> 76 <elastic-dns>${elastic_dns}</elastic-dns> 77  78 <!-- 79 - Configures the main application cluster. Load-balancing configurations 80 - will also have a web cluster. 81 --> 82 <cluster id="app"> 83 <!-- define the servers in the cluster 這裡配置連接埠 --> 84 <server-multi id-prefix="app-" address-list="127.0.0.1" port="6801">  85 <watchdog-port>6601</watchdog-port>  86 <http address="*" port="9097"/>  87 </server-multi> 88  89 <host-default> 90 <!-- creates the webapps directory for .war expansion 這裡我把webapps修改到webapp,因為我只要發布一個項目,當然理解可能有問題--> 91 <web-app-deploy path="webapp" 92 expand-preserve-fileset="WEB-INF/work/**" 93 multiversion-routing="${webapp_multiversion_routing}" 94 path-suffix="${elastic_webapp?resin.id:‘‘}"/> 95 </host-default> 96  97 <!-- auto virtual host deployment in hosts/foo.example.com/webapps --> 98 <host-deploy path="hosts"> 99 <host-default>100 <resin:import path="host.xml" optional="true"/>101 </host-default>102 </host-deploy>103 
     <!-- 這裡我修改/為我的項目路徑,即直接使用項目路由分配,設定項目位置,設定日誌按日期輸出。-->104 <host id="" root-directory="."> 105 <web-app id="/" root-directory="webapp/prnewsOrder"> 106 <form-parameter-max>100</form-parameter-max> 107 <stderr-log path=‘log/stderr.log‘ timestamp=‘[%Y-%m-%d %H:%M:%S] ‘ rollover-period=‘1D‘/> 108 <stdout-log path=‘log/stdout.log‘ timestamp=‘[%Y-%m-%d %H:%M:%S] ‘ rollover-period=‘1D‘/> 109 </web-app>110 </host> 111 112 113 </cluster>114 115 116 <cluster id="proxycache">117 <!-- define the servers in the cluster -->118 <server-multi id-prefix="proxycache-" address-list="${proxycache_servers}" port="6830">119 <http address="*" port="9078"/>120 </server-multi>121 122 <host id="" root-directory="proxycache">123 <web-app id="">124 <resin:HttpProxy regexp=".*">125 <!-- backend HTTP servers to proxy to -->126 <addresses>${backend_servers}</addresses>127 </resin:HttpProxy>128 </web-app>129 </host>130 </cluster>131 132 </resin>

 

resin4的初次配置與使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.