【總的文件夾網址】
https://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/
【適用於32位的apache2.2】
https://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-i386-httpd-2.2.x.zip
apache2.2.25可搭配mod_jk 1.2.40版本。
下載後將壓縮包裡面的mod_jk.so解壓到C:\Program Files\Apache Software Foundation\Apache2.2\modules文件夾中。
conf/httpd.conf裡面添加:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
JkRequestLogFormat "%w %V %T"
創建conf/workers.properties文件,內容如下:
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
tomcat的conf/server.xml裡面去掉8009埠Connector節點的注釋:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
apache的<VirtualHost>節點裡面添加:
JkMount /*.jsp worker1
重啟tomcat和apache伺服器,即可在apache service monitor的狀態欄裡面看到mod_jk/1.2.40的標識,如下圖所示。
