Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1Matthew, On 8/12/2010 10:42 AM, Matthew Fleming wrote:I'm a newbie with tomcat trying to get a basic mod_jk configuration working. I have a mod_jk.conf file containing JkMount /Client_Access ajp13 JkMount /Client_Access/* ajp13 I'm not getting any errors in the file specified as JkLogFile, and netstat -l shows a listening socket at port 8009. I can load my servlet from http://localhost:8080/Client_Access, but I can't load it from http://localhost/Client_Access so mod_jk isn't working. What could it be?mod_jk doesn't read a file called mod_jk.conf, so you've got to be including it in your httpd.conf, somewhere. Can you check your configuration to find out where it's being loaded? It's possible that your JkMount directives are being processed at the "top" level of the configuration and then are not being made visible in your VirtualHost. I recommend a few changes to your configuration:PS, here is my whole mod_jk.conf file: LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /home/mfleming/apache-tomcat-6.0.29/conf/workers.properties JkLogFile /var/log/mod_jk.log JkLogLevel info JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat "%w %V %T"Leave all of the above in mod_jk.confJkMount /Client_Access ajp13 JkMount /Client_Access/* ajp13Move these two lines into your httpd.conf file inside the VirtualHost that responds to http://localhost/ requests.worker.ajp13.cachesize=10As the logs state, this setting is deprecated. Check the mod_jk documentation for its replacement. You can find that documentation here: http://tomcat.apache.org/connectors-doc/reference/workers.html Just search for "cachesize". Read that section carefully: you might want to eliminate that option entirely from your configuration.
Furthermore, I would remove all the following lines : worker.ajp13.lbfactor=50 worker.ajp13.cachesize=10 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=300 and leave only these : worker.list=ajp13 worker.ajp13.type=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 Also, relative to the last line : worker.ajp13.port=8009check in your tomcat's server.xml file that you do have an uncommented <Connector> tag like this one :
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
This is, at the tomcat level, the connector that responds to your worker.ajp.port, so the
port number must match.
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
