<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    cuiyi's blog(崔毅 crazycy)

    記錄點滴 鑒往事之得失 以資于發展
    數據加載中……

    Apache Httpd 與 Tomcat的集成

    在借鑒了大量的文章后,搗鼓這套配置也用了差不多2個整晚上;現在基本摸索出了套路;按下面的程序辦肯定沒有問題
    版本:

    apache_2.0.49-win32-x86-no_ssl.msi

    jakarta-tomcat-connectors-jk2.0.4-win32-apache2.0.49.zip

    jakarta-tomcat-5.0.28.exe

    JDK1.4.2_10

    程序:

    安裝 JDK

    安裝 Tomcat http://localhost:8080/ 可訪問

    安裝 Httpd? http://localhost 可訪問

    解壓縮 connectors

    聲明 $httpd apache httpd 的安裝目錄,

    D:\programfiles\javas\apache\Apache2

    $tomcat Tomcat 的安裝目錄,

    D:\programfiles\javas\Tomcat5028

    ?

    集成

    1 拷貝 connectors 解壓縮獲得的 modules\mod_jk2.so $httpd\modules

    2 拷貝 connectors 解壓縮獲得的 conf \ workers2.properties.sample $httpd\conf

    并改名為 workers2.properties

    3 修改 $httpd\conf\httpd.conf 文件

    主要修改的位置:

    3.1

    #

    # DocumentRoot: The directory out of which you will serve your

    # documents. By default, all requests are taken from this directory, but

    # symbolic links and aliases may be used to point to other locations.

    #

    # DocumentRoot "D:/programfiles/javas/apache/Apache2/htdocs"

    DocumentRoot "$Tomcat/webapps/"

    3.2

    #

    # This should be changed to whatever you set DocumentRoot to.

    #

    <Directory "$Tomcat/webapps/">

    3.3

    # Where to find the workers2.properties file

    <IfModule mod_jk2.c>

    ? JkSet config.file $Httpd/conf/workers2.properties

    </IfModule>

    3.4

    <VirtualHost *:80>

    ?

    ServerName localhost

    ?

    ServerAlias domain.com *.domain.com

    ?

    DocumentRoot $Tomcat/webapps/

    ?

    ??? <Location "/*.jsp">

    ?

    ??????? JkUriSet worker ajp13:localhost:8009

    ?

    ??? </Location>

    ?

    </VirtualHost>

    3.5

    # Example:

    # LoadModule foo_module modules/mod_foo.so

    #

    LoadModule jk2_module modules/mod_jk2.so

    ?

    4 修改 $httpd\conf\ workers2.properties 文件

    改后內容大概如下:

    #? Set? a? Logger

    [logger.apache2]

    file=$httpd/error/error.log

    level=INFO

    debug=1

    ?

    #? config? settings

    [config]

    file=$httpd/conf/workers2.properties

    level=INFO

    debug=1

    ?

    #? Shared? Memory? file? settings

    [shm]

    info=Scoreboard. Requried for reconfiguration and status with multiprocess servers.

    file=$httpd/logs/jk2.shm

    size=1048576

    ?

    # Defines a load balancer named lb. Use even if you only have one machine.

    [lb:lb]

    # Example socket channel, override port and host.

    [channel.socket:localhost:8009]

    port=8009

    host=127.0.0.1

    ?

    # define the worker

    [ajp13:localhost:8009]

    channel=channel.socket:localhost:8009

    group=lb

    ?

    # Map the Tomcat examples webapp to the Web server uri space

    [uri:/*.jsp]

    worker=ajp13:localhost:8009

    ?

    5 修改 $Tomcat\conf\ jk2.properties 文件

    ?

    ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED

    ## WHEN YOU EDIT THE FILE.

    ?

    ## COMMENTS WILL BE _LOST_

    ?

    ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.

    ?

    # Set the desired handler list

    # handler.list=apr,request,channelJni

    #

    # Override the default port for the socketChannel

    ?channelSocket.port=8009

    # Default:

    # channelUnix.file=${jkHome}/work/jk2.socket

    # Just to check if the the config? is working

    ?shm.file=D:/programfiles/javas/apache/Apache2/logs/jk2.shm

    ?

    # In order to enable jni use any channelJni directive

    # channelJni.disabled = 0

    # And one of the following directives:

    ?

    ?apr.jniModeSo=D:/programfiles/javas/apache/Apache2/modules/mod_jk2.so

    ?

    # If set to inprocess the mod_jk2 will Register natives itself

    # This will enable the starting of the Tomcat from mod_jk2

    # apr.jniModeSo=inprocess

    ?

    ?

    大功告成。只要你把要發布的東西放到 $Tomcat/webapps 下就可以正常訪問了

    posted on 2006-05-23 16:46 crazycy 閱讀(1807) 評論(0)  編輯  收藏 所屬分類: JavaEE技術

    主站蜘蛛池模板: 久久免费视频99| 成人性生免费视频| 最近中文字幕免费2019| 日韩版码免费福利视频| 亚洲一区二区三区在线观看精品中文 | 真人无码作爱免费视频| 久久国产精品免费视频| 亚洲成色WWW久久网站| 亚洲av日韩av永久无码电影| 久久精品免费观看国产| 久久久久亚洲精品影视| 黄色三级三级免费看| 无码国产精品一区二区免费虚拟VR | 国产精品99久久免费观看| 亚洲自偷自偷精品| 又黄又大的激情视频在线观看免费视频社区在线| 久久黄色免费网站| 久久亚洲日韩看片无码| 国产一级高青免费| 免费一级毛片在级播放| 亚洲人成人网毛片在线播放| 永久免费视频网站在线观看| 精品亚洲视频在线观看| 国产精品久久亚洲一区二区| 亚洲精品第一国产综合境外资源 | 亚洲欧美日韩中文字幕在线一区| 16女性下面扒开无遮挡免费| 亚洲国产精品成人精品小说| 无码国产精品一区二区免费模式| 中文字幕精品亚洲无线码一区| 污污免费在线观看| 一区国严二区亚洲三区| 色综合久久精品亚洲国产| 亚洲午夜无码片在线观看影院猛 | 亚洲日日做天天做日日谢| 免费无码一区二区三区蜜桃大 | 免费A级毛片无码无遮挡内射| 鲁死你资源站亚洲av| 亚洲国产无套无码av电影| 三年片免费高清版| 亚洲av无码一区二区三区观看|