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

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

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

    cuiyi's blog(崔毅 crazycy)

    記錄點(diǎn)滴 鑒往事之得失 以資于發(fā)展
    數(shù)據(jù)加載中……

    Apache Httpd 與 Tomcat的集成

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

    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 文件

    改后內(nèi)容大概如下:

    #? 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

    ?

    ?

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

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

    主站蜘蛛池模板: 国产精品亚洲综合| 亚洲爆乳无码精品AAA片蜜桃| 一级看片免费视频囗交| 日韩精品免费一区二区三区| 亚洲av片劲爆在线观看| 你是我的城池营垒免费观看完整版| 五级黄18以上免费看| 8x8×在线永久免费视频| 性色av免费观看| 亚洲高清视频在线| 国内外成人免费视频| 18禁亚洲深夜福利人口| 亚洲美女免费视频| 亚洲天堂中文字幕在线观看| 亚洲免费在线观看| 亚洲国产精品va在线播放| 最近最新高清免费中文字幕 | 亚洲成av人片在线看片| 欧美好看的免费电影在线观看| 亚洲精品无码久久久久去q | 最近免费中文字幕大全视频| 亚洲精华国产精华精华液网站| 国产精品美女自在线观看免费| 久久丫精品国产亚洲av不卡| a视频在线免费观看| 中文字幕亚洲综合久久| 成年美女黄网站色大免费视频| 精品特级一级毛片免费观看| 亚洲精品乱码久久久久久蜜桃不卡 | 亚洲熟女综合色一区二区三区| 四虎永久在线精品免费观看地址| 中文在线观看国语高清免费| 亚洲系列国产精品制服丝袜第| 十八禁在线观看视频播放免费| 亚洲黄色网站视频| 国产免费爽爽视频免费可以看| 伊人免费在线观看| 亚洲三级在线观看| 亚洲色WWW成人永久网址| 国产日本一线在线观看免费| 五月天婷婷免费视频|