网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > JSP教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.Windows2000下Apache2.0.46与Tom.
.WIN98/2000下的jsp服务器.
.安装resin+mysql+IIS+JDK的总结.
.JSP的9种基本内置组件.
.JSP在win2000下的安装.
.JSP由浅入深(4)—— Scriptlets.
.JSP与XML的结合.
.Apache+Servlet+Jsp环境设置(下.
.JSP由浅入深(9)—— JSP Sessions.
.java在Linux下的web应用(二).
.在Linux上架设支持JSP+PHP的Web服.
.成为一个成功Jsp程序员的九步.
.入门教程:JSP标准模板库(下).
.Tomcat下JSP、Servlet和JavaBean.
.JSP由浅入深(12)—— 表单编辑.
.二、设置开发、运行环境.
.JAVA/JSP学习系列之一(JDK安装).
.win2000server IIS和tomcat5多站.
.JDBC 入门(三).
.jsp+tomcat+mysql+sevlet+javabe.

WIN2003上Apache2+IIS6+Tomcat5之多站点完美配置篇

发表日期:2006-7-3


本来以为上一次的配置就搞定了,结果本地测试好好的,到了服务器上调试就完蛋了,本地只测试了一个asp站和一个jsp站,而实际情况是多个asp站和我的jsp站,又试了两次还是不行,终于在第三次尝试后搞定了,写下来做个纪念。

第一次尝试使用:

<VirtualHost *:80>
   ServerAdmin feifei0658@sina.com
  ServerName www.5hope.com
   DcumentRoot "G:\5hope
   DirectoryIndex index.html index.htm index.asp 
  ProxyPass / http://www.5hope.com:88/
  ProxyPassReverse / www.5hope.com:88/
</VirtualHost>


<VirtualHost *:80>
    ServerAdmin feifei0658@sina.com
  ServerName www.shundabanjia.com 
  DocumentRoot "G:\wuyubing\www"
  DirectoryIndex index.html index.htm index.asp 
  ProxyPass / http://www.shundabanjia.com:88/
  ProxyPassReverse / http://www.shundabanjia.com:88/
</VirtualHost>

本以为这样设置多站点就搞定了,结果发现只识别第一个站点,访问别的站点都是这个站的内容,折腾了一上午,没成功。

第二次尝试使用:

<VirtualHost *:80>
 #添加了这个属性**********
 ProxyPreserveHost On
ServerAdmin feifei0658@sina.com 
  ServerName www.shundabanjia.com 
  DocumentRoot "G:\wuyubing\www"
  DirectoryIndex index.html index.htm index.asp 
  ProxyPass / http://www.shundabanjia.com:88/
  ProxyPassReverse / http://www.shundabanjia.com:88/
</VirtualHost>

LoadModule jk_module modules/mod_jk.so 
JkWorkersFile "D:\tomcat5.0.28\conf\workers.properties"
<VirtualHost *:80>
    ServerAdmin feifei0658@sina.com   
    ServerName www.openria.cn
    DirectoryIndex index.html index.htm index.jsp
    JkMount /* ajp13   
    JkAutoAlias "D:\tomcat-5.0.28\webapps\ria"  
    <Directory "D:\tomcat-5.0.28\webapps\ria">
       Options Indexes FollowSymLinks
       allow from all
    </Directory>
</VirtualHost>

这回经过查官方资料,发现了一个属性,叫ProxyPreserveHost On,试了一下,是可以用实现多个虚拟的asp站点了,但是和我的tomcat站点定义冲突,访问不了jsp站,又不行,只好再找。

第三次尝试使用:

NameVirtualHost *:80

<VirtualHost *:80>
  ProxyPreserveHost On
  ServerAdmin feifei0658@sina.com
  ServerName www.shundabanjia.com 
  DocumentRoot "G:\wuyubing\www"
  DirectoryIndex index.html index.htm index.asp 
  ProxyPass / http://www.shundabanjia.com:88/
  ProxyPassReverse / http://www.shundabanjia.com:88/
</VirtualHost>

LoadModule jk_module modules/mod_jk.so 
JkWorkersFile "D:\tomcat5.0.28\conf\workers.properties"
<VirtualHost *:80>
    ServerAdmin feifei0658@sina.com   
    ServerName www.openria.cn
    DirectoryIndex index.html index.htm index.jsp
    JkMount /* ajp13   
    JkAutoAlias "D:\tomcat-5.0.28\webapps\ria"  
    <Directory "D:\tomcat-5.0.28\webapps\ria">
       Options Indexes FollowSymLinks
       allow from all
    </Directory>
</VirtualHost>

经过反复看文档,这回终于搞定了,原来是没有吧"Use name-based virtual hosting."打开,去掉NameVirtualHost *:80前面的#号就可以了,真是晕啊。

总算成功了,看来有问题还需要看官方资料啊,网友的资料还是不完整啊,通过自己的努力,发现新的线索:

ProxyPreserveHost On
NameVirtualHost *:80
这也是自己的收获啊,希望这些经历能帮助需要他的人。

再次庆祝一下,自己的网站终于要开通了,欢迎访问:www.openria.cn

上一篇:zip版本Tomcat配置新手入门 人气:48984
下一篇:Tomcat JSP经典配置实例 人气:62417
浏览全部jsp的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐