Problem to configure Tomcat6 + apache2.2 on Ubuntu 10 server

眉间皱痕 提交于 2019-12-04 02:33:17

问题


I am trying to configure Tomcat6 with apache 2.2 on Ubuntu server 10. I followed a lot of tutorials but I was not able to make it work...

Please could someone help me??

Here is some information....

The mod_jk.so is located on apache module folder...

My 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

On server.xml I activated the follow line:

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

I created a 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

On apache.conf I added the follow line:

Include /var/lib/tomcat6/conf/mod_jk.conf

My apache log:

 [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

My tomcat log:

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

My apache log when I tryed to acces the url/tomcat or url/tomcat/index.html

[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

回答1:


RESOLVED

I writed the lines:

JkMount /tomcat ajp13
JkMount /tomcat/* ajp13
JkMount /examples ajp13
JkMount /examples/* ajp13

inside the apache.conf, but it was not working because I have virtualhosts, so these lines must be set inside the virtualhost



来源:https://stackoverflow.com/questions/5904484/problem-to-configure-tomcat6-apache2-2-on-ubuntu-10-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!