apachetomcat整合:Linux下Apache与Tomcat整合的简单方法来源: 发布时间:星期四, 2008年12月4日 浏览:110次 评论:0
1、准备,需要的文件。这里假定你已经正确安装配置好了JDK。 到Apache官方网站所需要的文件:
其中httpd和jakarta-tomcat-connectors为源码包,apache-tomcat为二进制包。 2、安装Apache。 # tar xzvf httpd-2.2.0.tar.gz # cd httpd-2.2.0 # ./configure ——prefix=/usr/local/apache2 ——enable-so # make # make install 3、安装Tomcat。 # cp apache-tomcat-5.5.12.tar.gz /usr/local/ # cd /usr/local # tar xzvf apache-tomcat-5.5.12.tar.gz # ln -s apache-tomcat-5.5.12 tomcat 4、编译生成mod_jk。 # tar xzvf jakarta-tomcat-connectors-1.2.15-src.tar.gz # cd jakarta-tomcat-connectors-1.2.15-src/jk/native # ./configure ——with-apxs=/usr/local/apache2/bin/apxs # make # cp ./apache-2.0/mod_jk.so /usr/local/apache2/modules/ 5、配置。 在/usr/local/apache2/conf/下面建立两个配置文件mod_jk.conf和workers.properties。 # vi mod_jk.conf 添加以下内容: # 指出mod_jk模块工作所需要的工作文件workers.properties的位置 JkWorkersFile /usr/local/apache2/conf/workers.properties # Where to put jk logs JkLogFile /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 # vi workers.properties 0
相关文章
读者评论
发表评论 |