resin安装配置
1. 安装jdk 同上 (要下载一个64的jdk,不然后面安装resin会出错)
2. 安装resin
wget www.aminglinux.com/bbs/data/attachment/forum/resin-4.0.36.tar.gz
tar zxvf resin-4.0.36.tar.gz
cd resin-4.0.36
./configure --prefix=/usr/local/resin --with-java-home=/usr/local/jdk1.8.0_31
make && make install
/etc/init.d/resin start
3. 配置resin
cd /usr/local/resin/conf
vim resin.xml
结构: <cluster id="app"> <host></host> </cluster> 虚拟主机配置就在<host></host>里配置
<host id="www.123.com" root-directory=".">
<web-app id="/" root-directory="/tmp/123"/>
</host>
注意,这里并不是在</host>下面再加一段,而是直接更改里面的<host></host>
vim /tmp/123/111.jsp //加入
<html><body><center>
Now time is: <%=new java.util.Date()%>
</center></body></html>
测试 :
curl -x127.0.0.1:8080 www.123.com/111.jsp
时间: 2024-10-12 04:22:53