隨筆 - 11  文章 - 2  trackbacks - 0
          <2007年7月>
          24252627282930
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          常用鏈接

          留言簿(1)

          隨筆檔案

          相冊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          本來以為上一次的配置就搞定了,結果本地測試好好的,到了服務器上調試就完蛋了,本地只測試了一個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

          該文章轉載自1024k:http://www.1024k.cn/web/2007/200701/15431.html

          posted on 2007-07-18 18:46 jacksontoto 閱讀(370) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 夏邑县| 高淳县| 东源县| 嘉荫县| 双流县| 玉龙| 洪湖市| 溧水县| 罗江县| 泾阳县| 滦平县| 隆化县| 桐城市| 霍邱县| 扶沟县| 凤台县| 莱阳市| 镇康县| 勐海县| 清涧县| 墨脱县| 潼南县| 长宁县| 镇平县| 方城县| 长兴县| 六安市| 巴林右旗| 唐海县| 天柱县| 孝感市| 喀喇| 遂溪县| 哈尔滨市| 海城市| 洛阳市| 乌鲁木齐市| 临高县| 潞城市| 通州市| 蕉岭县|