【问题标题】:Configure Apache2 and tomcat7 with mod_jk用 mod_jk 配置 Apache2 和 tomcat7
【发布时间】:2013-01-02 05:06:12
【问题描述】:

我想在Linux环境下用mod_jk配置Apache2和tomcat7..我想知道步骤..请帮我配置一下...

【问题讨论】:

    标签: linux apache2 tomcat7


    【解决方案1】:

    你自己尝试过什么吗?

    http://tomcat.apache.org/connectors-doc/generic_howto/quick.html 应该让你继续前进。但是,如果您还没有尝试过任何事情,那么我们该如何帮助您呢?让用户知道是否有任何特定问题,包括错误消息等。

    【讨论】:

    • 当我按照 cmd 运行时...Linux 窗口正在关闭。 ./configure --with-apxs=/usr/sbin/apxs
    • 可能不需要自己编译。你用的是什么发行版?
    【解决方案2】:

    您必须为 apache 进行配置(我使用 CentOS)。第一个文件在 /etc/httpd/conf/wokers.properties 下

    # the name tomcat1 is variable
    worker.list=tomcat1
    # default ajp port on server.xml of tomcat
    worker.tomcat1.port=8009
    worker.tomcat1.host=localhost
    worker.tomcat1.type=ajp13
    worker.tocmat1.socket_timeout=200
    worker.tomcat1.retries=1
    

    第二个文件取决于是全局的还是想要为虚拟主机定制。以下示例基于虚拟主机(/etc/httpd/conf/virtualhost.conf)

    JkWorkersFile "/etc/httpd/conf/workers.properties
    JkLogFile /var/log/httpd/jk.log
    JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
    JkLogLevel info
    
    # mount all under URI /
    JkMount /* tomcat1
    
    # umount /robots.txt, request goes to apache document root
    JkMount /robots.txt tomcat1
    

    【讨论】:

      猜你喜欢
      • 2014-10-26
      • 2018-07-10
      • 1970-01-01
      • 2013-05-05
      • 2017-01-07
      • 2014-11-16
      • 2014-02-19
      • 1970-01-01
      • 2015-02-10
      相关资源
      最近更新 更多