我試圖安裝Tomcat和測試工作正常後,在Ubuntu 12.04, 與mod_jk的安裝Tomcat 7的Apache2:的Tomcat 7的Apache2在Ubuntu的mod_jk 12.04
http://139.162.221.XXX:8080/tomcat-demo/helloworld/
我安裝和配置mod_jk的:
sudo apt-get install libapache2-mod-jk
下面一行的註解<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
文件中 等/ tomcat7/server.xml中
補充一點:
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
到/etc/apache2/workers.properties
變化JkWorkersFile屬性/etc/apache2/workers.properties文件在/ etc/apache2的/ mods-可用/ jk.conf
編輯文件:/等//000默認的Apache2 /啓用站點,
添加
個<VirtualHost *:80>
.......................................
.......................................
JkMount /tomcat-demo/* worker1
JkMount /tomcat-demo worker1
</VirtualHost *:80>
重啓服務器:
sudo /etc/init.d/tomcat7 restart
sudo /etc/init.d/apache2 restart
但訪問到http://139.162.221.XXX/tomcat-demo/helloworld/
我得到這個錯誤:
Not Found
The requested URL /tomcat-demo/helloworld/ was not found on this server.
Apache/2.4.7 (Ubuntu) Server at 139.162.221.107 Port 80
和我也有這個錯誤重新啓動Apache:
* Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message