gpt4 book ai didi

apache mod_Jk 错误日志

转载 作者:行者123 更新时间:2023-11-28 22:27:49 27 4
gpt4 key购买 nike

我正在运行一个 apache 网络服务器和一个 tomcat 服务器。我现在正试图从 apache 转发到 tomcat。两台服务器都在线并正在运行,并且安装了 mod_jk。但是当我尝试时我不断收到错误:错误的网关

代理服务器收到来自上游服务器的无效响应。这是 mod_jk 错误日志文件,有人可以帮我吗? http://txs.io/o3Pb

workers.properties 看起来像这样:

  workers.tomcat_home= /"Directory of the tomcat"
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=***** /*Port of the tomcat*/

我希望我提供了你需要知道的所有信息最好的问候

最佳答案

[Tue Jan 05 02:11:11 2016] [24716:140046289016640] [info] init_jk::mod_jk.c (3591): mod_jk/1.2.41 initialized

这意味着您的 mod_jk 已安装并处于初始状态。问题出在您的 mod_jk 配置文件上。你需要配置 workers.properties 和 mod_jk.conf

试试这个作为 workers.properties:

# vi /etc/httpd/conf/workers.properties
worker.list=worker1
# Define Node1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1

对于 mod_jk.conf:

# vi /etc/httpd/conf.d/mod_jk.conf
<IfModule !mod_jk.c>
LoadModule jk_module "/usr/lib64/httpd/modules/mod_jk.so"
</IfModule>

JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "/var/log/httpd/mod_jk.log"
JkLogLevel info

#NameVirtualHost 159.253.xx.xx:80
<VirtualHost 159.253.xx.xx:80>
ServerName localhost
JkMount /manager worker1
JkMount /manager/* worker1

JkMount /docs worker1
JkMount /docs/* worker1

JkMount /examples worker1
JkMount /examples/* worker1

JkMount /host-manager worker1
JkMount /host-manager/* worker1

JkMount /servlet/* worker1
JkMount /*.jsp worker1
</VirtualHost>

然后重启你的httpd

干杯!

关于apache mod_Jk 错误日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34649973/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com