resin服务之三---独立resin的配置
独立resin的配置
|
关掉httpd服务: [root@data-1-1 ~]# killall httpd [root@data-1-1 ~]# lsof -i :80 ------>httpd服务的80端口已经停掉!
配置resin主配置文件修改如下内容: 90 <http address="*" port="80"/> 104 <http address="*" port="80"/>
启动服务: [root@data-1-1 ~]# killall java [root@data-1-1 ~]# /application/resin/bin/httpd.sh -server peng start Resin/3.1.13 started -server 'peng' for watchdog at 127.0.0.1:6921 [root@data-1-1 ~]# /application/resin/bin/httpd.sh -server peng01 start Resin/3.1.13 started -server 'peng01' for watchdog at 127.0.0.1:6922
查看的80端口是resin开通的: [root@data-1-1 ~]# lsof -i :80 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 27876 root 73u IPv6 2885724 0t0 TCP *:http (LISTEN) |
测试(此时是resin独立做web服务)
|
[root@data-1-1 ~]# curl http://www.peng.cc/test.jsp 99+1=100 [root@data-1-1 ~]# curl http://blog.peng.cc/test.jsp 99+1=100 [root@data-1-1 ~]# curl http://blog.peng.org/test.jsp 1+1=2 [root@data-1-1 ~]# curl http://www.peng.org/test.jsp 1+1=2 |
为resin配置别名功能
实现Apache前端多个域名对应后端一个或多个resin的域名。
|
265 <!--Create first virtual hosts at 20160112.--> 266 <host id="www.peng.org" root-directory="/application/resin/webapps"> 267 <host-alias>blog.peng.org</host-alias> <host-alias>bbs.peng.org</host-alias> |
为resin配置错误页面优雅显示
|
282 <error-page error-code='404' location='/tips/404.html'/> |
提示:以上配置在每个对应的resin host里都要配置。
演示过程如下:
|
[root@data-1-1 ~]# cd /application/resin/webapps/peng/ [root@data-1-1 peng]# mkdir tips [root@data-1-1 peng]# echo 'this is 404 error page!' >>tips/404.html [root@data-1-1 peng]# cat tips/404.html this is 404 error page! 提示:错误页面配置内容的根目录是resin站点的根目录,例如:/application/resin/webapps/peng
访问一个不存在的页面,客户端访问发现已经进行了404错误页面跳转了: [root@data-1-1 peng]# curl http://www.peng.org/b.jsp this is 404 error page! 提示:Windows客户端谷歌支持,IE和搜狗测试支持的不是很好。 |
为resin配置状态信息显示页面
|
278 <servlet-mapping servlet-class='com.caucho.servlets.ResinStatusServlet'> 279 <url-pattern>/resin-status-peng.org</url-pattern> 280 <init enable="read"/> 281 </servlet-mapping> |
浏览器输入如下地址,查看显示结果:
http://www.peng.org/resin-status-peng.org


独立resin web服务与整合企业里如何选用?
Apache+resin
1)resin下的8080和8081端口要不要开启?
解答:看业务需求!
Apache+resin ==》提供服务
Resin+http80(内置web服务器)==》提供服务
2)如果开启了,实现了哪些功能?
解答:resin独立提供web服务。
3)关闭了,又有什么好处呢?
解答:Apache和resin一起工作,轻松,动静分离。
为resin配置管理页面
|
285 <web-app id="/resin-admin-peng.org" root-directory="${resin.home}/php/admin"> 286 <character-encoding>utf8</character-encoding> 287 <prologue> 288 <resin:set var="resin_admin_external" value="true"/> 289 <resin:set var="resin_admin_insecure" value="true"/> 290 </prologue> 291 <security-constraint> 292 <web-resource-collection> 293 <url-pattern>/*</url-pattern> 294 </web-resource-collection> 295 </security-constraint> 296 </web-app> |
操作演示如下:
浏览器上输入地址:http://www.peng.org/resin-admin-peng.org/
出现如下界面:

在标红的地方输入用户名:peng 密码:redhat
出现如下内容:
The digest for user peng in realm resin is Ji1p9d0+6tX5O0iEGgnPMQ==
The following can now be set in the resin.conf file to enable administration functionality.
<resin xmlns="http://caucho.com">
<management path="admin">
<user name="peng" password="Ji1p9d0+6tX5O0iEGgnPMQ=="/>
...
</management>
...
</resin>
By default, access to the administration application is limited to the localhost. The default behaviour can be changed in the resin.conf file. To enable access to clients other than localhost:
<resin:set var="resin_admin_external" value="true"/>
Once the file has been updated, you can continue to the administration area.
When prompted, use the username and password you provided.
修改resin.conf配置文件(增加标黄的内容):
|
21 <management path="${resin.root}/admin"> 22 <user name="peng" password="Ji1p9d0+6tX5O0iEGgnPMQ==" disable="false"/> 23 24 <resin:if test="${resin.professional}"> 25 <deploy-service/> 26 <jmx-service/> 27 <log-service/> 28 <xa-log-service/> 29 </resin:if> 30 </management> |
重启服务:
|
[root@data-1-1 ~]# killall java [root@data-1-1 ~]# /application/resin/bin/httpd.sh -server peng start Resin/3.1.13 started -server 'peng' for watchdog at 127.0.0.1:6921 [root@data-1-1 ~]# /application/resin/bin/httpd.sh -server peng01 start Resin/3.1.13 started -server 'peng01' for watchdog at 127.0.0.1:6922 |
在浏览器界面填入相关信息点击提交:






resin服务之三---独立resin的配置的更多相关文章
- Apached+resin服务搭建
一.前言 Resin是CAUCHO公司的产品,是一个非常流行的支持servlets 和jsp的引擎,速度非常快.对servlet和JSP提供了良好的支持,性能也比较优良,resin自身采用JAVA语言 ...
- resin服务之一---安装及部署
参考网站: http://caucho.com/ http://www.oschina.net/p/resin http://caucho.com/resin-4.0/admin/starting-r ...
- resin服务之二----整合resin+Apache服务
整合resin+Apache服务 1.为什么要整合Apache和resin? a. 早期的resin,tomcat对httpd服务支持不好. b. tomcat,resin对rewrite,expi ...
- resin服务一直不停重启
resin服务不断重启. 原因为resin配置文件使用域名.需要到服务上绑定一下域名.
- Reporting Service服务SharePoint集成模式安装配置(3、4、安装sharepoint 2010必备组件及产品)
Reporting Service服务SharePoint集成模式安装配置 第三步和第四部 第三步 安装sharepoint 2010必备组件 1.安装SharePoint2010必备组件,执行Pre ...
- SVN1.6服务端和客户端安装配置指导
本节向大家描述SVN1.6服务端和客户端安装配置步骤,随着SVN的快速发展,版本也进行了升级更新,本节就和大家一起学习一下SVN1.6服务端和客户端安装配置步骤,欢迎大家一起来学习.下面是具体介绍.1 ...
- Windows下基于IIS服务的SSL服务器的配置
Windows下基于IIS服务的SSL服务器的配置 实验环境 Windows Server 2008 R1(CA) Windows Server 2008 R2(web服务器) Windows 7 x ...
- paip. java resin 远程 调试 java resin remote debug
paip. java resin 远程 调试 java resin remote debug 作者Attilax 艾龙, EMAIL:1466519819@qq.com 来源:attilax的专栏 ...
- CAS单点登录(SSO)服务端的部署和配置---连接MySQL进行身份认证
一.修改系统host,加入 127.0.0.1 server.test.com127.0.0.1 client1.test.com127.0.0.1 client2.test.com 二.安装grad ...
随机推荐
- 【.net】AppDoamin| 应用程序域
在.net framework框架上,一个进程可以有多个appdomain.因此一个进程可以运行多个程序. 应用程序域的出现: (来自msdn) 在.net出现以前,一个进程下,只能运行一个应用 ...
- 【C# 程序集】C# assembly和module 根本区别
相同点 两者都有:manifest.metadata.IL 不同点 1.assembly 有main程序函数.module只能附属于程序集,程序集可以拥有多个. 2.metadata的差异 程序集特有 ...
- shell之局域网内脚本检查主机网络通讯(附并发改写)
转至:https://blog.csdn.net/yrx420909/article/details/104355825 需求:写一个脚本,局域网内,把能ping通的IP和不能ping通的IP分类,并 ...
- 无状态子域名爆破工具:ksubdomain
概述 开源地址:https://github.com/knownsec/ksubdomain 二进制文件下载:https://github.com/knownsec/ksubdomain/releas ...
- windows下CMD常用命令(url链接)
https://blog.csdn.net/LJFPHP/article/details/78818696
- 转 Autofac怎么依赖注入ASP.NET MVC5类的静态方法
之前我有介绍过怎么在ASP.NET mvc5中实现的Controller的依赖注入.一般是通过Contrller的构造函数的参数或者属性来注入,但是这有一个共同点就是调用这个类的方法一般都是实例方法, ...
- Java中常用的加密方式(附多个工具类)
一.Java常用加密方式 Base64加密算法(编码方式) MD5加密(消息摘要算法,验证信息完整性) 对称加密算法 非对称加密算法 数字签名算法 数字证书 二.分类按加密算法是否需要key被分为两类 ...
- 官宣 .NET 7 Preview 2
今天,我们很高兴发布 .NET 7 预览版 2..NET 7 的第二个预览版包括对 RegEx 源生成器的增强.将 NativeAOT 从实验状态转移到运行时的进展,以及对"dotnet n ...
- Windows XP系统搜索故障及处理办法点点通
故障1:单击资源管理器工具栏上的"搜索"按钮或者按F3,系统无任何响应. 解决方法:首先进入C:\Windows\inf文件夹(该文件夹属性为隐藏),右键单击srchasst.in ...
- Java基础——方法重写
什么是方法重写? 子类中出现和父类中完全一样的方法声明 什么时候可以进行方法重写? 在子类需要父类的功能的同时,功能主体子类有自己的特有内容时,可以重写,一面沿袭了父类的功能一面又定义了子类特有的内容 ...