resin4的初次配置与使用

简介: 之前用的resin3,结果发布新项目老师文件冲突,我也找不到是哪里有问题,于是尝试使用resin4. 首先从官网下载最新resin4。 然后放到opt下,tar -zvxf 解压。 然后修改conf/resin.xml。

之前用的resin3,结果发布新项目老师文件冲突,我也找不到是哪里有问题,于是尝试使用resin4.

首先从官网下载最新resin4。

然后放到opt下,tar -zvxf 解压。

然后修改conf/resin.xml。

另外,修改resin默认端口8080为其他:8070:

在conf/resin.property中找到8080并修改:

# Set HTTP and HTTPS ports.
# Use overrides for individual server control, for example: app-0.http : 8081
app.http : 8070

最终修改如下:  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>

 





唯有不断学习方能改变! -- Ryan Miao
目录
相关文章
|
弹性计算 网络协议 网络安全
在Windows Server系统上配置静态IP
在Windows Server系统上配置静态IP的方法
在Windows Server系统上配置静态IP
|
8天前
|
云安全 人工智能 算法
以“AI对抗AI”,阿里云验证码进入2.0时代
三层立体防护,用大模型打赢人机攻防战
1401 10
|
8天前
|
机器学习/深度学习 安全 API
MAI-UI 开源:通用 GUI 智能体基座登顶 SOTA!
MAI-UI是通义实验室推出的全尺寸GUI智能体基座模型,原生集成用户交互、MCP工具调用与端云协同能力。支持跨App操作、模糊语义理解与主动提问澄清,通过大规模在线强化学习实现复杂任务自动化,在出行、办公等高频场景中表现卓越,已登顶ScreenSpot-Pro、MobileWorld等多项SOTA评测。
1262 5
|
9天前
|
人工智能 Rust 运维
这个神器让你白嫖ClaudeOpus 4.5,Gemini 3!还能接Claude Code等任意平台
加我进AI讨论学习群,公众号右下角“联系方式”文末有老金的 开源知识库地址·全免费
1114 14
|
3天前
|
人工智能 前端开发 API
Google发布50页AI Agent白皮书,老金帮你提炼10个核心要点
老金分享Google最新AI Agent指南:让AI从“动嘴”到“动手”。Agent=大脑(模型)+手(工具)+协调系统,可自主完成任务。通过ReAct模式、多Agent协作与RAG等技术,实现真正自动化。入门推荐LangChain,文末附开源知识库链接。
396 118
|
6天前
|
存储 缓存 NoSQL
阿里云经济型e实例(ecs.e-c1m4.large)2核8G云服务器优惠活动价格及性能测评
阿里云经济型e实例(ecs.e-c1m4.large)2核8G配置,支持按使用流量或按固定带宽两种公网计费方式,搭配20G起ESSD Entry云盘,是主打高性价比的内存优化型入门选择。其核心特点是8G大内存适配轻量内存密集场景,计费模式灵活可控,既能满足个人开发者的复杂测试项目需求,也能支撑小微企业的基础业务运行,无需为闲置资源过度付费。以下从优惠活动价格、性能表现、适用场景及避坑要点四方面,用通俗语言详细解析。
224 153
|
3天前
|
机器学习/深度学习 人工智能 算法
炎鹊「Nexus Agent V1.0」:垂直领域AI应用的原生能力引擎
炎鹊AI「Nexus Agent V1.0」是垂直行业专属AI原生引擎,融合大模型、AIGA决策大脑、行业知识图谱与专属模型,打造“感知-决策-执行”闭环。支持21个行业低代码构建工具型、员工型、决策型AI应用,实现技术到业务价值的高效转化,推动AI从实验走向规模化落地。(239字)
242 1

热门文章

最新文章