之前用的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. Git 的origin和master分析

    首先要明确一点,对git的操作是围绕3个大的步骤来展开的(其实几乎所有的SCM都是这样) 1.     从git取数据(git clone) 2.     改动代码 3.     将改动传回git(g ...

  2. Linux之脚本安装软件

      查看启动程序   ps aux    准备工作 1.保证yum源正常使用 2.关闭SELinux和防火墙   下载脚本文件包 解压缩 运行 ./centors.sh

  3. [.NET领域驱动设计实战系列]专题五:网上书店规约模式、工作单元模式的引入以及购物车的实现

    一.前言 在前面2篇博文中,我分别介绍了规约模式和工作单元模式,有了前面2篇博文的铺垫之后,下面就具体看看如何把这两种模式引入到之前的网上书店案例里. 二.规约模式的引入 在第三专题我们已经详细介绍了 ...

  4. Vmware配置

    1.网络 四种连接模式的区别:http://www.cnblogs.com/awpatp/archive/2009/07/24/1530471.html 如果网卡使用Nat模式,则需要启动服务: VM ...

  5. ENode 1.0 - 框架的总体目标

    开源地址:https://github.com/tangxuehua/enode 本文想介绍一下enode框架要实现的目标以及部分实现分析思路剖析.总体来说enode框架是一个基于cqrs架构和消息驱 ...

  6. iOS 打包iPa

    http://blog.fir.im/how-to-build-adhoc-ipa/ 之前都是打包好ipa然后发送给客户,特麻烦,fir.im网站不错 迅速获取自己手机的udid:  http://f ...

  7. cocoapods 更新

    sudo gem update --system sudo gem install cocoapods pod setup pod --version

  8. Netfilter/iptables的匹配方式及处理方法

    匹配方式: 匹配方式是netfilter筛选数据包的最基本单元. 内置的匹配方式: 1.接口的匹配方式: iptables -t filter -A FORWARD -i eth0 -o eth1 - ...

  9. 每天一个linux命令(31): /etc/group文件详解

    Linux /etc/group文件与/etc/passwd和/etc/shadow文件都是有关于系统管理员对用户和用户组管理时相关的文件.linux /etc/group文件是有关于系统管理员对用户 ...

  10. 每天一个linux命令(27):linux chmod命令

    chmod命令用于改变linux系统文件或目录的访问权限.用它控制文件或目录的访问权限.该命令有两种用法.一种是包含字母和操作符表达式的文字设定法:另一种是包含数字的数字设定法. Linux系统中的每 ...