ubuntu 設定 apache+tomcat mod_jk

1.安裝下載 mod_jk
sudo apt-get install libapache2-mod-jk

2.檢查 apache是否有載入
sudo ls /etc/apache2/mods-enabled

3.修改apache2.conf
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkMount /tomcat的url/* localhost
JkMount /jkstatus/* jkstatus

4.新增一個檔案 /etc/apache2/workers.properties
sudo vi /etc/apache2/workers.properties內容:
worker.list=localhost,jkstatus
worker.localhost.port=8009
worker.localhost.host=localhost
worker.localhost.type=ajp13
worker.jkstatus.type=status

Related Posts