tomcat apache整合,应用非tomcat根目录

news/2024/7/10 3:38:19 标签: tomcat, apache, path, 测试

我的解决方法:

  apache 配置虚拟主机,即两个主机采用基于IP地址的虚拟主机配置方法:

                   IP                     folder

                   127.0.0.1         /var/www

                   10.1.1.254       /var/j2e 

 tomcat 配置虚拟主机   即两个主机采用基于IP地址的虚拟主机配置方法:

                   IP                     folder

                   127.0.0.1         /usr/share/tomcat5.5

                   www.j2elocal.com       /var/j2e  (在hosts 文件中 加入 10.1.1.254  www.j2elocal.com)

  通过测试  www.j2elocal.com通过,但是用ip地址就不可以,有些疑问!望高手指点!

 

附:tomcat 虚拟主机配置代码 server.xml

<Host name="www.j2elocal.com" debug="0" appBase="/var/j2e" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/var/j2e" debug="0" reloadable="true" crossContext="true"/>
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="ok.com_log." suffix=".txt" timestamp="true" />
</Host>

 

注意红色那行文字,与apache中的虚拟主机目录相同!


http://www.niftyadmin.cn/n/1535604.html

相关文章

各组评论总结

第一组&#xff1a; 周宝辉组的“找到了”作品&#xff0c;找物寻物的功能网页&#xff0c;就像老师说的短期刺激&#xff0c;长时间使用&#xff0c;缺少使用的查找分类等功能&#xff0c;首页图片需要更换&#xff0c;寻物消息&#xff0c;认领消息分类明确易懂&#xff0c;应…

Xenu Link Sleuth死链接检测工具(SEO工具)

Xenu是一款深受业界好评&#xff0c;并被广泛使用的死链接检测工具。可检测出指定网站的所有死链接包括图片链接等&#xff0c;并用红色显示。Xenu‘s Link Sleuth 也许是你所见过的最小但功能最强大的检查网站死链接的软件了。你可以打开一个本地网页文件来检查它的链接&#…

apache tomcat 中文乱码解决

每个页面头加入&#xff1a; <%page pageEncoding" UTF-8 " contentType"text/html; charset UTF-8 " %> 或者在tomcat的server.xml中加入&#xff1a; <Connector port"8080" maxHttpHeaderSize"8192" …

游标 cursor

a 定义游标——Cursor [ Cursor Name[param_name, param_type]] IS select xxx from xxxwhere xxx; b 打开游标——Open [ Cursor Name[varialbe_value] ] ; c 操作游标——Fetch [ Cursor Name ]; d 关闭游标——Close [ Cursor Name ] ; 常见显式Cursor用法&#xff1a;1使用…

C++动态库使用

个人博客地址: https://cxx001.gitee.io 前言 Windows与Linux下面的动态链接库区别 1. 文件后缀不同 Linux动态库的后缀是 .so 文件&#xff0c;而window则是 .dll 文件。 2. 文件格式不同 &#xff08;a&#xff09;Linux下是ELF格式&#xff0c;即Executable and Linkab…

用Eclipse(CDT)和MinGW构建Windows上的C/C++开发环境

C开发环境 Visual Studio2008: Vs2008sp1 VA_X Eclipse3.5.1: JDK1.6&#xff08;jave环境&#xff09;Eclipse3.5.1&#xff08;已集成了CDT&#xff0c;c&#xff09;MinGW5.1.6&#xff08;gcc&#xff09;gdb-6.6.tar.bz2MSYS-1.0.10&#xff08;makefile&#xff09;多年以…

DOM编程从入门到忘记

文档对象模型&#xff08;Document Object Model&#xff0c;DOM&#xff09;是使用 W3C 定义的 API (Application Program Interface) 来操作 HTML 文档 &#xff08;此处不局限于 HTML&#xff0c;亦可操作 XHTML、XML 等&#xff09;&#xff0c;使用户可以与进行页面交互。…

linux如何清除系统的cache buffer与cache的区别

linux如何清除系统的cache 在内核文档的Documentation/filesystems/proc.txt里面有说。 drop_caches ----------- Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free. To free pagec…