防止mod_jk显示/附加index.cfm?& _modcfml在页面加载时重定向 [英] Prevent mod_jk to shows/append index.cfm?&_modcfmlredirected on page load

查看:235
本文介绍了防止mod_jk显示/附加index.cfm?& _modcfml在页面加载时重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了在apache2中配置的虚拟主机,以将cf站点代理到lucee/tomcat,并使用mode_jk进行代理.

I have set a virtual host configured in apache2 to proxy my cf sites to lucee/tomcat, and using mode_jk for the proxy.

一切正常,除了服务器重新启动apache或lucee后第一次打开我的网站,或者mod_jk有点重定向到index.cfm并将&_modcfmlredirected附加到URL之外.

Everything works fine except that on first time opening my website after a server restart the apache or lucee or the mod_jk kinda redirects to index.cfm and appending &_modcfmlredirected to the url.

因此,当我打开网址cf.test时,我会得到cf.test/index.cfm&_modcfmlredirected

So when I open url cf.test I get cf.test/index.cfm&_modcfmlredirected

我不希望发生这种情况,任何人都可以解释为什么发生这种情况以及如何防止这种情况发生.

I don't want this to happen, can anyone explain why this is happening AND how to prevent this.

顺便说一句:第一次点击后,网页加载正常,没有上述效果.

BTW: After 1st hit the webpage loads fine without the above effect.

只有一个index.cfm页面,其中只包含一行仅回显日期的代码.

There is just a single index.cfm page containing Just one line of code which echoes date only.

虚拟主机配置:

<VirtualHost cf.test:80>
    ServerAdmin webmaster@cf.test
    ServerName cf.test
    ServerAlias www.cf.test
    DocumentRoot /var/www/html/cf.test/public_html
    DirectoryIndex index.cfm
    JkMount /*.cfm ajp13_worker

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

worker-properties:

worker-properties:

workers.tomcat_home=/opt/tomcat
workers.java_home=/opt/lucee/jre/bin
worker.list=ajp13_worker
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
worker.ajp13_worker.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker

  • 操作系统:Ubuntu 18.04-全新安装
  • Apache 2.4-默认安装
  • PHP 7.3从ondrej ppa的默认安装
  • 默认存储库中的
  • mod_jp 安装libapache2-mod-jk
    • OS: Ubuntu 18.04 - Fresh Install
    • Apache 2.4 - default install
    • PHP 7.3 default install from ondrej ppa
    • mod_jp from default repository install libapache2-mod-jk
    • 推荐答案

      您可以通过将"mod_cfml-valve_v1.1.09.jar"更新为"mod_cfml-valve_v1.1.10.jar"来解决此问题.

      You can resolve this by updating your 'mod_cfml-valve_v1.1.09.jar' to 'mod_cfml-valve_v1.1.10.jar'.

      您可以从> https://github.com/viviotech/mod_cfml/tree/master/java

      (谢谢Zac Spitzer)

      (Thank you Zac Spitzer)

      更多信息在这里: https://github.com/viviotech/mod_cfml/issues/24

      这篇关于防止mod_jk显示/附加index.cfm?&amp; _modcfml在页面加载时重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆