#Load mod_jk moduleLoadModule jk_module modules/mod_jk.so#Where to find workers.propertiesJkWorkersFile conf/workers.properties#Where to put jk logsJklogFile logs/mod_jk.log#Set the jk log level[debug/error/info]JkLogLevel info#Select the log formatJkLogStampFormat "[%a %b %d %H:%M:%S %Y] "#JkOptions indicate to send SSL KEY SIZE,JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories#JkRequestLogFormat set the request formatJkRequestLogFormat "%w %V %T"#Send servlet for context /examples to worker named ajp13JkMount /servlet/* ajp13#Send all files under MyProject for to worker named ajp13JKMount /MyProject ajp13
4、修改/conf/httpd.conf Listen 80改为Listen 你的IP:80 ServerName localhost:80
最后一行添加 Include conf/mod_jk.conf 找到DocumentRoot,记住它的值,后面有用。我的是/www/apache/htdocs5、添加<VirtualHost>节点
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
ServerName www.sample.cn/m
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /MyProject http://www.sample.cn/MyProject/pages/login.jsp