http://blog.csdn.net/sea0x/article/details/6097531

resin 启动:

resin 配置文件摘取:

  1. <server-default>
  2.  
  3. <!-- The http port -->
  4.  
  5. <http address="*" port=""/>
  6.  
  7. <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
  8.  
  9. <watchdog-port></watchdog-port>
  10.  
  11. <!-- define the servers in the cluster -->
  12.  
  13. <server id="" address="127.0.0.1" port=""/>
  14.  
  15. <host id="" root-directory=".">
  16.  
  17. <!--
  18.  
  19. - configures an explicit root web-app matching the
  20.  
  21. - webapp's ROOT
  22.  
  23. -->
  24.  
  25. <web-app id="/" root-directory="webappsempwb/empwb"/>
  26.  
  27. <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
  28.  
  29. <!--
  30.  
  31. - Administration application /resin-admin
  32.  
  33. -->
  34.  
  35. <prologue>
  36.  
  37. <resin:set var="resin_admin_external" value="false"/>
  38.  
  39. <resin:set var="resin_admin_insecure" value="true"/>
  40.  
  41. </prologue>
  42.  
  43. </web-app>
  44.  
  45. </host>

<cache-mapping url-pattern="/" expires="5s"/>

<cache-mapping url-pattern="*.gif" expires="60s"/>

<cache-mapping url-pattern="*.jpg" expires="60s"/>

<cache-mapping url-pattern="*.png" expires="60s"/>

resin配置文件:

  1. app-default.xml fine.conf resin1.conf resin.conf resin_dsq.conf resin_eisifind.conf resin_ndis.conf
  2. development.conf minimal.conf resin_cas.conf resin.conf.orig resin_eisi.conf resinempwb.conf resin_som.conf
  3. [root@vm---pro01-hp conf]# cat resinempwb.conf
  4. <!--
  5. - Resin 3.1 configuration file.
  6. -->
  7. <resin xmlns="http://caucho.com/ns/resin"
  8. xmlns:resin="http://caucho.com/ns/resin/core">
  9.  
  10. <!-- adds all .jar files under the resin/lib directory -->
  11. <class-loader>
  12. <tree-loader path="${resin.home}/ext-lib"/>
  13. <tree-loader path="${resin.root}/ext-lib"/>
  14.  
  15. <tree-loader path="${resin.home}/lib"/>
  16. <tree-loader path="${resin.root}/lib"/>
  17. </class-loader>
  18.  
  19. <!--
  20. - Management configuration
  21. -
  22. - Remote management requires at least one enabled admin user.
  23. -->
  24. <management path="${resin.root}/admin">
  25. <user name="admin" password="password" disable="true"/>
  26. <resin:if test="${resin.professional}">
  27. <deploy-service/>
  28. <jmx-service/>
  29. <log-service/>
  30. <xa-log-service/>
  31. </resin:if>
  32. </management>
  33.  
  34. <!--
  35. - Logging configuration for the JDK logging API.
  36. -->
  37. <log name="" level="info" path="stdout:"
  38. timestamp="[%H:%M:%S.%s] {%{thread}} "/>
  39.  
  40. <!--
  41. - 'info' for production
  42. - 'fine' or 'finer' for development and troubleshooting
  43. -->
  44. <logger name="com.caucho" level="info"/>
  45.  
  46. <logger name="com.caucho.java" level="config"/>
  47. <logger name="com.caucho.loader" level="config"/>
  48.  
  49. <!--
  50. - For production sites, change dependency-check-interval to something
  51. - like 600s, so it only checks for updates every minutes.
  52. -->
  53. <dependency-check-interval>2s</dependency-check-interval>
  54.  
  55. <!--
  56. - SMTP server for sending mail notifications
  57. -->
  58. <system-property mail.smtp.host="127.0.0.1"/>
  59. <system-property mail.smtp.port=""/>
  60.  
  61. <!--
  62. - Sets the default character encoding to utf-
  63. -
  64. - <character-encoding>utf-</character-encoding>
  65. -->
  66.  
  67. <!--
  68. - You can change the compiler to "javac", "eclipse" or "internal".
  69. -->
  70. <javac compiler="internal" args="-source 1.5"/>
  71.  
  72. <!-- Security providers.
  73. - <security-provider>
  74. - com.sun.net.ssl.internal.ssl.Provider
  75. - </security-provider>
  76. -->
  77.  
  78. <!-- Uncomment to use Resin's XML implementations
  79. -
  80. - <system-property javax.xml.parsers.DocumentBuilderFactory
  81. - ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
  82. - <system-property javax.xml.parsers.SAXParserFactory
  83. - ="com.caucho.xml.parsers.XmlSAXParserFactory"/>
  84. -->
  85.  
  86. <cluster id="app-tier">
  87. <!-- sets the content root for the cluster, relative to server.root -->
  88. <root-directory>.</root-directory>
  89.  
  90. <server-default>
  91. <!-- The http port -->
  92. <http address="*" port=""/>
  93.  
  94. <!--
  95. - SSL port configuration:
  96. -
  97. - <http address="*" port="">
  98. - <openssl>
  99. - <certificate-file>keys/gryffindor.crt</certificate-file>
  100. - <certificate-key-file>keys/gryffindor.key</certificate-key-file>
  101. - <password>test123</password>
  102. - </openssl>
  103. - </http>
  104. -->
  105.  
  106. <!--
  107. - The JVM arguments
  108. -->
  109.  
  110. <jvm-arg>-Xmx1024m</jvm-arg>
  111. <jvm-arg>-Xmn512m</jvm-arg>
  112. <jvm-arg>-XX:PermSize=128m</jvm-arg>
  113. <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
  114. <jvm-arg>-Xss1m</jvm-arg>
  115. <jvm-arg>-Xdebug</jvm-arg>
  116. <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
  117. <!--
  118. - Uncomment to enable admin heap dumps
  119. - <jvm-arg>-agentlib:resin</jvm-arg>
  120. -->
  121.  
  122. <!--
  123. - arguments for the watchdog process
  124. -->
  125. <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
  126. <watchdog-port></watchdog-port>
  127.  
  128. <!--
  129. - Configures the minimum free memory allowed before Resin
  130. - will force a restart.
  131. -->
  132. <memory-free-min>1M</memory-free-min>
  133.  
  134. <!-- Maximum number of threads. -->
  135. <thread-max></thread-max>
  136.  
  137. <!-- Configures the socket timeout -->
  138. <socket-timeout>65s</socket-timeout>
  139.  
  140. <!-- Configures the keepalive -->
  141. <keepalive-max></keepalive-max>
  142. <keepalive-timeout>15s</keepalive-timeout>
  143.  
  144. <!--
  145. - If starting bin/resin as root on Unix, specify the user name
  146. - and group name for the web server user.
  147. -
  148. - <user-name>resin</user-name>
  149. - <group-name>resin</group-name>
  150. -->
  151. </server-default>
  152.  
  153. <!-- define the servers in the cluster -->
  154. <server id="" address="127.0.0.1" port=""/>
  155.  
  156. <!--
  157. - Configures the persistent store for single-server or clustered
  158. - in Resin professional.
  159. -->
  160. <resin:if test="${resin.professional}">
  161. <persistent-store type="cluster">
  162. <init path="session"/>
  163. </persistent-store>
  164. </resin:if>
  165. <!--
  166. - For security, use a different cookie for SSL sessions.
  167. - <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
  168. -->
  169.  
  170. <!--
  171. - Enables the cache (available in Resin Professional)
  172. -->
  173. <resin:if test="${resin.professional}">
  174. <cache path="cache" memory-size="64M">
  175. <!-- Vary header rewriting for IE -->
  176. <rewrite-vary-as-private/>
  177. </cache>
  178. </resin:if>
  179.  
  180. <!--
  181. - Enables periodic checking of the server status and
  182. - check for deadlocks..
  183. -
  184. - All servers can add <url>s to be checked.
  185. -->
  186. <resin:if test="${resin.professional}">
  187. <ping>
  188. <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
  189. </ping>
  190. </resin:if>
  191.  
  192. <!--
  193. - Defaults applied to each web-app.
  194. -->
  195. <web-app-default>
  196. <prologue>
  197. <!--
  198. - Extension library for common jar files. The ext is safe
  199. - even for non-classloader aware jars. The loaded classes
  200. - will be loaded separately for each web-app, i.e. the class
  201. - itself will be distinct.
  202. -->
  203. <class-loader>
  204. <tree-loader path="${resin.root}/ext-webapp-lib"/>
  205. </class-loader>
  206.  
  207. <!--
  208. - Enable EL expressions in Servlet and Filter init-param
  209. -->
  210. <allow-servlet-el/>
  211. </prologue>
  212.  
  213. <!--
  214. - Sets timeout values for cacheable pages, e.g. static pages.
  215. -->
  216. <cache-mapping url-pattern="/" expires="5s"/>
  217. <cache-mapping url-pattern="*.gif" expires="60s"/>
  218. <cache-mapping url-pattern="*.jpg" expires="60s"/>
  219. <cache-mapping url-pattern="*.png" expires="60s"/>
  220.  
  221. <!--
  222. - for security, disable session URLs by default.
  223. -->
  224. <session-config>
  225. <enable-url-rewriting>false</enable-url-rewriting>
  226. </session-config>
  227.  
  228. <!--
  229. - For security, set the HttpOnly flag in cookies.
  230. - <cookie-http-only/>
  231. -->
  232.  
  233. <!--
  234. - Some JSP packages have incorrect .tld files. It's possible to
  235. - set validate-taglib-schema to false to work around these packages.
  236. -->
  237. <jsp>
  238. <validate-taglib-schema>true</validate-taglib-schema>
  239. <fast-jstl>true</fast-jstl>
  240. </jsp>
  241. </web-app-default>
  242.  
  243. <!-- includes the app-default for default web-app behavior -->
  244. <resin:import path="${resin.home}/conf/app-default.xml"/>
  245.  
  246. <!--
  247. - Sample database pool configuration
  248. -
  249. - The JDBC name is java:comp/env/jdbc/test
  250. <database>
  251. <jndi-name>jdbc/mysql</jndi-name>
  252. <driver type="org.gjt.mm.mysql.Driver">
  253. <url>jdbc:mysql://localhost:3306/test</url>
  254. <user></user>
  255. <password></password>
  256. </driver>
  257. <prepared-statement-cache-size></prepared-statement-cache-size>
  258. <max-connections></max-connections>
  259. <max-idle-time>30s</max-idle-time>
  260. </database>
  261. -->
  262.  
  263. <!--
  264. - Default host configuration applied to all virtual hosts.
  265. -->
  266. <host-default>
  267. <!--
  268. - With another web server, like Apache, this can be commented out
  269. - because the web server will log this information.
  270. -->
  271. <access-log path="logs/access.log"
  272. format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
  273. rollover-period="1W"/>
  274.  
  275. <!-- creates the webapps directory for .war expansion -->
  276. <web-app-deploy path="webapps"/>
  277.  
  278. <!-- creates the deploy directory for .ear expansion -->
  279. <ear-deploy path="deploy">
  280. <ear-default>
  281. <ejb-server>
  282. <config-directory>WEB-INF</config-directory>
  283. </ejb-server>
  284. </ear-default>
  285. </ear-deploy>
  286.  
  287. <!-- creates the deploy directory for .rar expansion -->
  288. <resource-deploy path="deploy"/>
  289. </host-default>
  290.  
  291. <!-- configures a deployment directory for virtual hosts -->
  292. <host-deploy path="hosts">
  293. <host-default>
  294. <resin:import path="host.xml" optional="true"/>
  295. </host-default>
  296. </host-deploy>
  297.  
  298. <!-- configures the default host, matching any host name -->
  299. <host id="" root-directory=".">
  300. <!--
  301. - configures an explicit root web-app matching the
  302. - webapp's ROOT
  303. -->
  304. <web-app id="/" root-directory="webappsempwb/empwb"/>
  305.  
  306. <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
  307. <!--
  308. - Administration application /resin-admin
  309. -->
  310. <prologue>
  311. <resin:set var="resin_admin_external" value="false"/>
  312. <resin:set var="resin_admin_insecure" value="true"/>
  313. </prologue>
  314. </web-app>
  315. </host>
  316. </cluster>
  317.  
  318. <!--
  319. - Configuration for the web-tier/load-balancer
  320. -->
  321. <resin:if test="${resin.professional}">
  322. <cluster id="web-tier">
  323. <server-default>
  324. <!-- The http port -->
  325. <http address="*" port=""/>
  326. </server-default>
  327.  
  328. <server id="web-a" address="127.0.0.1" port=""/>
  329.  
  330. <cache path="cache" memory-size="64M"/>
  331.  
  332. <host id="">
  333. <web-app id="/">
  334.  
  335. <rewrite-dispatch>
  336. <load-balance regexp="" cluster="app-tier"/>
  337. </rewrite-dispatch>
  338.  
  339. </web-app>
  340. </host>
  341. </cluster>
  342. </resin:if>
  343.  
  344. </resin>

resin的更多相关文章

  1. resin实现域名访问

    1.修改resin.properties 2.修改hosts文件 3.添加一行记录 配置完后就可以通过test.com访问项目了.

  2. resin实现热部署配置

    修改resin.xml文件 <host id="test.com" root-directory="."> <host-alias>te ...

  3. eclipse下maven项目保持原有目录结构配置resin运行环境

    maven项目用起来很方便,但是它的目录结构和eclipse的目录结构是有区别的,故而在eclipse下的maven项目,直接运行调试是有一些问题的. 为了方便maven项目的运行调试,因而也就有了像 ...

  4. resin启动报错:guava-15.0.jar!/META-INF/beans.xml:5: <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"> is an unexpected top-level tag. 异常

    项目完成,经过本地的测试,最后在部署的时候,发现服务器resin启动失败,报错信息如下:

  5. resin 安装配置

    resin (下载免费版 4) 前提:已经安装了Java运行环境,resin的安装需要jdk的支持   一.安装 1.cd /usr/local/src wget http://www.caucho. ...

  6. 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署

    阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...

  7. (转载)Resin安装配置及使用教程

    Resin是一个提供高性能的,支持 Java/PHP 的应用服务器.目前有两个版本:一个是GPL下的开源版本,提供给一些爱好者.开发人员和低流量网站使用:一种是收费的专业版本,增加了一些更加适用于生产 ...

  8. Atitit.url 汉字中文路径  404 resin4 resin  解决  v2 q329

    Atitit.url 汉字中文路径  404 resin4 resin  解决  v2 q329 1. Pluginx机制1 2. Code1 3. 参考4 1. 原理 过滤器  ,,拦截jpg  w ...

  9. Nginx+Resin实现高性能JAVA平台搭建

    现在流行的JavaEE容器有很多:Tomcat.Resin.JBoss.Glassfish等,我们常用的主要是前三种,那这个java容器性能方面到底谁更稳定,并发能力更强呢?那当属resin了,res ...

随机推荐

  1. SPOJ GSS4 Can you answer these queries IV

    Time Limit: 500MS   Memory Limit: 1572864KB   64bit IO Format: %lld & %llu Description You are g ...

  2. [NOIP2012] 提高组 洛谷P1083 借教室

    题目描述 在大学期间,经常需要租借教室.大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室.教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样. 面对海量租借教室的信息,我们自然 ...

  3. 向列布局动态添加F7

    function initBuildingEntryF7(sellId){ var comId = "buildingEntry"; var filter = "&quo ...

  4. protected的使用注意

    在c#的可访问性级别中,public和private算是最容易理解的,相反protected往往令人非常头疼.经常在网上查资料的朋友往往会发现,答案几乎都是前篇一律,不是从msdn上拷贝的就是从别人的 ...

  5. C# 静态类与非静态类、静态成员的区别

    静态类 静态类与非静态类的重要区别在于静态类不能实例化,也就是说,不能使用 new 关键字创建静态类类型的变量.在声明一个类时使用static关键字,具有两个方面的意义:首先,它防止程序员写代码来实例 ...

  6. JSONArray的使用

    用的是fastjson.jar包 1. jsonarray,jsonobject 使用正确代码如下:(这种getJSONObject 函数形成jsonobj 的方式非常好,可以避免循环引用或jsono ...

  7. Session对象

    Session对象用于存储在多个页面调用之间特定用户的信息.Session对象只针对单一网站使用者,不同的客户端无法互相访问.Session对象中止于联机机器离线时,也就是当网站使用者关掉浏览器或超过 ...

  8. Yocto开发笔记之《嵌入式linux libcurl编程》(QQ交流群:519230208)

    开了一个交流群,欢迎爱好者和开发者一起交流,转载请注明出处. QQ群:519230208,为避免广告骚扰,申请时请注明 “开发者” 字样 =============================== ...

  9. HTML meta viewport属性详细说明

    viewport并非只是ios上的独有属性,在android.winphone上同样也有viewport,下面为大家详细介绍下HTML meta viewport 什么是Viewport 手机浏览器是 ...

  10. centos Apache、php、mysql默认安装路径

    apache: 如果采用RPM包安装,安装路径应在 /etc/httpd目录下 apache配置文件:/etc/httpd/conf/httpd.conf Apache模块路径:/usr/sbin/a ...