LoadModule jk_module modules/mod_jk.so # Declare the module for (remove this line on Apache 2.x) #AddModule mod_jk.c # Where to find workers.properties # Update this path to match your conf directory location (put workers.properties next to httpd.conf) JkWorkersFile conf/workers.properties # Where to put jk logs # Update this path to match your logs directory location (put mod_jk.log next to access_log) #JkLogFile logs/mod_jk.log # JkLogFile "|/opt/webserver/apache2/bin/rotatelogs /opt/logs/mod_log/mod%Y_%m_%d.log 86400 480" # Set the jk log level [debug/error/info] JkLogLevel info # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send everything for context /examples to worker named worker1 (ajp13) #JkMount /* balancer JkMountFile conf/uriworkermap.properties JkShmFile logs/jk.shm
SetHandler server-status JkMount status Order deny,allow Deny from all Allow from all
#workers # ------------------------ # First tomcat server # ------------------------ worker.localhost.port=8009 worker.localhost.host=127.0.0.1 worker.localhost.type=ajp13 #worker.localhost.socket_timeout=300 worker.localhost.lbfactor=1
# Status worker for managing load balancer worker.status.type=status
# # END workers.properties #
uriworkermap.properties是定義工作單里每個工作項的轉發規則的,見下: # Simple worker configuration file # Mount the Servlet context to the ajp13 worker #/jmx-console=loadbalancer #/jmx-console/*=loadbalancer