實踐apache和tomcat的整合,原來這麼簡單.
1:安裝tomcat,jdk,這些就不說了,這個大家應該都會
2:下載apache_2.2.11-win32-x86-no_ssl.msi,這在apache網站上就有,
3:下載mod_jk-1.2.28-httpd-2.2.3.so,這個是apache和tomcat整合必須的,在apache網站上也有,
4:安裝好apache http server後,進入到apache的安裝目錄下, Apache2.2\conf ,在此新建一個workers.properties文件,將以下內容copy到workers.properties文件中
# Defining a worker named worker1 and of type ajp13
worker.list=ajp13w
worker.ajp13w.type=ajp13
worker.ajp13w.host=127.0.0.1
worker.ajp13w.port=8009
worker.ajp13w.lbfactor=1
5: copy mod_jk-1.2.28-httpd-2.2.3.so文件到Apache2.2\modules目錄下,並且改名為mod_jk.so(為了方便)
6:配置Apache2.2\conf目錄下httpd.conf文件,增加以下內容:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkMount /*.jsp ajp13w
JkMount /*.jspx ajp13w
JkMount /servlet/* ajp13w
JkMount /*.servlet ajp13w
JkMount /* ajp13w
上面都配置好之後,啟動tomcat ,啟動apache,輸入http://localhost ,看到tomcat的首頁就ok了
source: http://codestandup.blogspot.com/2009/07/apache-tomcat.html
1 則留言:
張貼留言