我正在尝试在 Ubuntu 服务器 10 上使用 apache 2.2 配置 Tomcat6。我遵循了很多教程,但我无法让它工作......
请问有人可以帮我吗?
这里有一些信息......
mod_jk.so 位于 apache 模块文件夹中...
我的workers.properties
worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.lbfactor=50
worker.ajp13.cachesize=10
worker.ajp13.cache_timeout=600
worker.ajp13.socket_keepalive=1
worker.ajp13.socket_timeout=300
在 server.xml 上,我激活了以下行:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
我创建了一个 mod_jk.conf
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /var/lib/tomcat6/conf/workers.properties
JkLogFile /var/lib/tomcat6/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
JkMount /tomcat ajp13
JkMount /tomcat/* ajp13
JkMount /examples ajp13
JkMount /examples/* ajp13
在 apache.conf 我添加了以下行:
Include /var/lib/tomcat6/conf/mod_jk.conf
我的阿帕奇日志:
[Thu May 05 18:20:53 2011] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status
[Thu May 05 18:20:53 2011] [notice] Apache/2.2.14 (Ubuntu) DAV/2 PHP/5.3.2-1ubuntu4.9 with Suhosin-Patch mod_python/3.3.1 Python/2.6.5 mod_ruby/1.2.6 Ruby/1.8.7(2010-01-10) mod_ssl/2.2.14 OpenSSL/0.9.8k mod_jk/1.2.28 configured -- resuming normal operations
我的tomcat日志:
May 5, 2011 6:22:26 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 5, 2011 6:22:26 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/97 config=null
当我尝试访问 url/tomcat 或 url/tomcat/index.html 时,我的 apache 日志
[Thu May 05 18:23:18 2011] [error] [client 200.153.100.51] File does not exist: /var/www/tomcat
[Thu May 05 18:23:21 2011] [error] [client 200.153.100.51] File does not exist: /var/www/tomcat