[转载]apache+tomcat5.5(tomcat6)
作者 wsrforever
浏览
发布时间 10/03/06
| e /usr/local/apache2/logs/mod_jk.log # 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" # 将所有servlet 和jsp请求通过ajp13的协议送给Tomcat,让Tomcat来处理 JkMount /servlet/* worker1 JkMount /*.jsp worker1 在workers.properties中添加如下 # Defining a worker named worker1 and of type ajp13 worker.list=worker1 # Set properties for worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 2.5 更新Apache2中的配置 配置ports.conf,将Listen 80 修改为 Listen 127.0.0.1:80 配置apache2.conf,将ServerName 127.0.0.1 改为 ServerName localhost:80 配置httpd.conf,设置如下内容 # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var index.php index.jsp #LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so Include /etc/apache2/conf/mod_jk.conf 2.6 更新Tomcat配置 修改tomcat配置文件server.xml 用<!-- -->屏蔽掉一下内容 <!--<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">--> 并替换成 <Host name="amoyrico" appBase="/var/www" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" workDir="/var/www/work"> <Context privileged="true" crossContext="true" docBase="htdocs" path="/" reloadable="true&quo |
<< 现在还有人记得席慕蓉的诗吗?4月2日 >>

































