国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Apache > 正文

Win2003完美配置Apache+IIS+Tomcat多站點

2024-08-27 18:29:10
字體:
來源:轉載
供稿:網友
  本來以為上一次的配置就搞定了,結果本地測試好好的,到了服務器上調試就完蛋了,本地只測試了一個asp站和一個jsp站,而實際情況是多個asp站和jsp站,又試了兩次還是不行,終于在第三次嘗試后搞定了,寫下來做個紀念。

  第一次嘗試使用:

<virtualhost *:80>
serveradmin [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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 [email protected]
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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 海南省| 肥东县| 津市市| 宿迁市| 韶山市| 土默特左旗| 马尔康县| 武强县| 新河县| 乌兰浩特市| 巩义市| 湘西| 景德镇市| 井研县| 建阳市| 尼勒克县| 寻乌县| 三亚市| 迁安市| 浮山县| 嘉祥县| 南安市| 潍坊市| 翁牛特旗| 灵川县| 开平市| 竹山县| 蛟河市| 定兴县| 大邑县| 泗洪县| 古丈县| 河津市| 小金县| 太仆寺旗| 铁力市| 通河县| 怀远县| 宽城| 伊宁市| 象州县|