在apache中使用mod_jk时出错:undefined symbol:ap_get_server_version

时间:2016-08-30 22:54:12

标签: linux apache tomcat

我们刚刚安装了新的RHEL7服务器。在这个服务器里面,我们有一堆vhosts,在vhosts里面有一行看起来像这样 -

JkMount /rules_engine/rulesApi/rules/* rulesEngine
JkMount /api/* rulesEngine
JkMount /rules_editor/* rulesEngine

因此,为了处理这个问题,我们在apache配置中使用mod_jk。但是,当我尝试启动apache时,我收到以下错误 -

Syntax error on line 1 of /etc/httpd/conf.d/mod_jk.conf: Cannot load /etc/httpd/modules/mod_jk.so into server: /etc/httpd/modules/mod_jk.so: undefined symbol: ap_get_server_version

mod_jk.conf文件在/etc/httpd/conf.d中,看起来像这样 -

LoadModule jk_module /etc/httpd/modules/mod_jk.so
JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
Change to WARN or ERROR for Prod
JkLogLevel info
JkShmFile /var/log/httpd/mod_jk.shm
JkMount /rulesApi/rules/* rulesEngine
JkMount /api/* rulesEngine
JkMount /* rulesEditor
JkMount /rules_editor/* rulesEditor

关于该错误意味着什么,以及如何启动apache的任何想法?

感谢。

1 个答案:

答案 0 :(得分:1)

AFAIK,The error usually occurs if using mismatch version of mod_jk with apache. The RHEL 7 uses Apache/2.4.6.So see if you are using the supported/compatible version of mod_jk or not. I'm not sure but in my knowledge mod_jk is not supported/compatible with this default version of apache in RHEL 7. So,build the community version of apache and use the mod_jk from there.