之前用的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.

   -->
<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: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"/> <!--
- 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: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>
<elastic-server>${elastic_server}</elastic-server>
<elastic-dns>${elastic_dns}</elastic-dns> <!--
- 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="127.0.0.1" port="6801">
<watchdog-port>6601</watchdog-port>
<http address="*" port="9097"/>
</server-multi> <host-default>
<!-- creates the webapps directory for .war expansion 这里我把webapps修改到webapp,因为我只要发布一个项目,当然理解可能有问题-->
<web-app-deploy path="webapp"
expand-preserve-fileset="WEB-INF/work/**"
multiversion-routing="${webapp_multiversion_routing}"
path-suffix="${elastic_webapp?resin.id:''}"/>
</host-default> <!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
<host-deploy path="hosts">
<host-default>
<resin:import path="host.xml" optional="true"/>
</host-default>
</host-deploy>

     <!-- 这里我修改/为我的项目路径,即直接使用项目路由分配,设置项目位置,设置日志按日期输出。-->
<host id="" root-directory=".">
<web-app id="/" root-directory="webapp/prnewsOrder">
<form-parameter-max>100</form-parameter-max>
<stderr-log path='log/stderr.log' timestamp='[%Y-%m-%d %H:%M:%S] ' rollover-period='1D'/>
<stdout-log path='log/stdout.log' timestamp='[%Y-%m-%d %H:%M:%S] ' rollover-period='1D'/>
</web-app>
</host> </cluster> <cluster id="proxycache">
<!-- define the servers in the cluster -->
<server-multi id-prefix="proxycache-" address-list="${proxycache_servers}" port="6830">
<http address="*" port="9078"/>
</server-multi> <host id="" root-directory="proxycache">
<web-app id="">
<resin:HttpProxy regexp=".*">
<!-- backend HTTP servers to proxy to -->
<addresses>${backend_servers}</addresses>
</resin:HttpProxy>
</web-app>
</host>
</cluster> </resin>

resin4的初次配置与使用的更多相关文章

  1. Sublime Text3安装以及初次配置

    Sublime Text3安装以及初次配置 工具:官网下载:Sublime Text3 安装:直接运行安装.http://write.blog.csdn.net/postedit 激活:参考文/晚晴幽 ...

  2. git使用教程(初次配置+错误提示)

    初次使用配置目录:https://blog.csdn.net/Esc_Tab_End/article/details/84144063 error: RPC failed; curl 56 OpenS ...

  3. Linux Resin4.0 安装配置

    Resin,是一个非常流行的application server,对servlet和JSP提供了良好的支持,性能优良,resin自身采用Java语言开发.Resin Pro版本支持缓存和负载均衡,收费 ...

  4. 转载 | Sublime Text3 安装以及初次配置

    本文引自:http://blog.csdn.net/u011272513/article/details/52088800 工具:官网下载:Sublime Text3 安装:直接运行安装.http:/ ...

  5. 初次配置eclipse, jdk, tomcat, maven, mysql, alt+/

    eclipse 官网下载eclipse-inst-win64.exe, 选择安装java ee. jdk 官网下载jdk-8u102-windows-x64.exe, next到底. 接下来配置环境变 ...

  6. 初次配置git与github出现push不了的问题

    ssh: connect to host gmail.com port 22: No route to host fatal: Could not read from remote repositor ...

  7. eclipse3.7+resin4.0集成配置小结

    1.插件不要用improve公司的了,那个太老了.直接用resin官方的,用eclipse的help->install new software功能,地址用:http://www.caucho. ...

  8. mac 初次配置apache,及mac下安装mysql

    先打开apache,在浏览器上输入  localhost     回车后会如果屏幕上显示:It works! 如下图: 这说明你的apache已开启 mac 下apache配置(mac自带apache ...

  9. nginx反向代理负载均衡初次配置

    反向代理,我个人理解是通过一台反向代理服务器,把客户端的把有请求按照一定的规则分发给后台的服务器.nginx作反向代理服务器的虚拟机配置如下: upstream itest { #正常情况下应该作如下 ...

随机推荐

  1. Aoite 系列(04) - 强劲的 CommandModel 开发模式(上篇)

    Aoite 是一个适于任何 .Net Framework 4.0+ 项目的快速开发整体解决方案.Aoite.CommandModel 是一种开发模式,我把它成为"命令模型",这是一 ...

  2. Programming Entity Framework CodeFirst -- 约定和属性配置

     以下是EF中Data Annotation和 Fluenlt API的不同属性约定的对照.   Length Data Annotation MinLength(nn) MaxLength(nn) ...

  3. C# WPF 让你的窗口始终钉在桌面上

    IntPtr hWnd = new WindowInteropHelper(Application.Current.MainWindow).Handle; IntPtr hWndProgMan = F ...

  4. Linux vim命令

    介绍 vim命令和vi的操作基本一致,vim命令的参数很多,我在这里列出了一些平时需要用的一些参数,vim主要有两个界面一个是esc的操作界面还有一个是输入i的编辑界面. 移动光标 0 (零):将光标 ...

  5. CocoSocket开源下载与编写经验分享

    CocoSocket分享 cocos2dx 3.1都出了,但依然没有发现与它原生的SOCKET支持,于是,这几天在家,手工撸了一个. 目前版本对IOS,ANDROID,WINDOWS支持良好.且为异步 ...

  6. sublime 3 快捷键

    来自(http://dengo.org/archives/970) Sublime text 3是我最喜欢的代码编辑器,每天和代码打交道,必先利其器,掌握基本的代码编辑器的快捷键,能让你打码更有效率. ...

  7. Fedora Static Configure

    Background Currenlty! I am work on fedora system, but the static-ip has required, but the fedora hav ...

  8. Mysql 函数分类

    比较重要的 1 REVERSE(s)    将字符串s的顺序反过来 2 TRIM(s)          去掉字符串s开始和结尾处的空格 一.数学函数  数学函数主要用于处理数字,包括整型.浮点数等. ...

  9. SQL将JSON转成列

    好久不写东西,这个也没什么技术含量,放上来玩玩,也许有人用的着. /** * create procedure for get all fields from json * * Mark * * 20 ...

  10. ListView优化为何ViewHolder用static类(转载)

    如果有人还不了解ViewHolder为什么可以起到优化作用,我这边再做下简单说明:Android的findViewById动作是比较耗时的,需要遍历布局的树形结构,才能找到相应的视图.所以如果想在这一 ...