apache + resin + shtml安裝步驟:
1,下載apache_1.3.37.tar.gz到/opt/apache_1.3.37
2, cd /opt/apache_1.3.37
3, 編譯apache
./configure --prefix=/opt/apache --enable-module=so --enable-module=rewrite --enable-module=speling
make
make install
將在/opt/出現apache
4,編譯resin。
cd /opt/resin_test
./configure --with-apache=/opt/apache
make
make install
5,修改apache配置文件
地址:/opt/apache/conf/httpd.conf
(1) 修改apache端口
236行 Port ** ->你要求的端口(如:90)
(2) 修改和resin的連接端口
951行: ResinConfigServer localhost 6820
6820是第4步編譯產生的默認端口,需根據自己要求修改
(3) DirectoryIndex加入index.jsp 263行
設置默認訪問頁面
(4) 設置resin的web服務
283行 把DocumentRoot指向resin的webapp目錄(如:/opt/resin_test/doc)
(5) 配置SSI
取消以下注釋: 790行
#AddType text/html .shtml
#AddHandler server-parsed .shtml
(6) 317行
Options Indexes FollowSymLinks MultiViews 增加Includes
改為:Options Indexes FollowSymLinks MultiViews Includes
(7) 308行
將Directory的屬性改為
<Directory "/opt/resin_test/doc"> resin的服務地址
以上6,7也可改為以下設置:
或者將293行的標記作如下修改
修改前
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
修改后
<Directory />
Options FollowSymLinks Includes
AllowOverride None
</Directory>
apache會認為所有路徑下均可使用shtml的include功能
apache的啟動:
cd /opt/apache/bin
啟動:apachectl start
停止:apachectl stop
重啟:apachectl restart
第一次重啟時會出現以下語句:
./apachectl restart: httpd not running, trying to start
[Thu Nov 2 15:57:19 2006] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
./apachectl restart: httpd started
此是正常的,以后重啟就不會出現了
用http://localhost:90/caucho-status可以查看apache和resin連接器的當前狀態
參考資料:
http://www.onlamp.com/catalog/apache/excerpt/ch10.html
http://support.microsoft.com/default.aspx?scid=kb%3Bzh-cn%3B203064
posted on 2007-05-25 12:48
分享愛的空間 閱讀(777)
評論(1) 編輯 收藏