linux下整合apache和tomcat

[复制链接]
  • TA的每日心情
    搞基
    2015-6-26 09:57
  • 签到天数: 8 天

    [LV.3]后起之秀

    累计在线
    2370分钟
    发表于 2015-10-21 10:22:45 | 显示全部楼层 |阅读模式
    linux下整合apache和tomcat
    yum install php* httpd* tomcat* mysql*
    mv mod_jk-1.2.31-httpd-2.2.x.so /etc/httpd/modules/mod_jk.so
    chmod +x /etc/httpd/modules/mod_jk.so
    vi /etc/httpd/conf/httpd.conf
    在DirectoryIndex中添加 index.jsp index.php
    ------------------------------------------------------------
    1
    2
    #for tomcat
    include "/etc/httpd/conf/mod_jk.conf"
    ------------------------------------------------------------
    vi /etc/httpd/conf/mod_jk.conf
    ------------------------------------------------------------
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    #Load mod_jk module
    LoadModule jk_module modules/mod_jk.so
    #Where to find workers.properties
    JkWorkersFile conf/workers.properties
    #Where to put jk logs
    JklogFile 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"
    #Send servlet for context /examples to worker named ajp13
    #JkMount /servlet/* ajp13
    #Send JSPs for context /examples to worker named ajp13
    JkMount /*.jsp ajp13
    -------------------------------------------------------------
    云服务器提供商---千喜网络
    vi /etc/httpd/conf/workers.properties
    -------------------------------------------------------------
    1
    2
    3
    4
    5
    worker.list=ajp13
    worker.ajp13.port=8009
    worker.ajp13.host=localhost
    worker.ajp13.type=ajp13
    worker.ajp13.lbfactor=1
    -------------------------------------------------------------
    vi /etc/tomcat6/server.xml
    在HOST段中加入:
    1
    <Context path="" docBase="/var/www/html" debug="0" reloadable="true" crossContext="true"/>
    vi /etc/php.ini
    1
    2
    3
    4
    short_open_tag = On
    post_max_size = 100M
    upload_max_filesize = 100M
    date.timezone =PRC
    陕西php空间、asp空间、jsp空间、net空间、香港空间--口口2256488371
    chkconfig iptables off
    chkconfig php-fpm --level 35 on
    chkconfig httpd --level 35 on
    chkconfig tomcat6 --level 35 on
    chkconfig mysqld --level 35 on


    立即注册!免费学习海量IT技术信息!!
    您好!您暂时不能浏览帖子的全部内容,请 登录 | 没有帐号? 注册QQ登录
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表