快速整合
apache2+tomcat5.5
的方法:
??????
以前把
tomcat
僅作為測試環境使用,都是使用
8080
端口訪問。目前要做個小網站(
www.openfans.net
)就使用
tomcat5.5
做應用服務器,用
apache2
作為
web
服務器。網上一搜,介紹這個的很多,但大多千篇一律,而且從
apache
,
tomcat
配置一步步講起,不勝其煩。假定
apache
和
tomcat
都已經配置完成,現在要做的很簡單。
http://archive.apache.org/dist/jakarta/tomcat-connectors/jk2/binaries/win32/jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip
,把里面的
mod_k2.so
拷到
apache
所在目錄的
modules
下,然后在
httpd.conf
加上“
LoadModule jk2_module modules/mod_jk2.so
”,并按
apache
的說明:
Create a workers2.properties in conf (where httpd.conf is localised).
Put something like the following in the file:
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
?
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
?
[uri: /*]
worker=ajp13:localhost:8009
?
Restart Apache.
?
輸入
http://localhost
就可以看到
tomcat
的歡迎頁面了。