I have set a virtual host configured in apache2 to proxy my cf sites to lucee/tomcat, and using mode_jk for the proxy.
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.
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.
There is just a single index.cfm page containing Just one line of code which echoes date only.
virtual host config:
<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:
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
You can resolve this by updating your 'mod_cfml-valve_v1.1.09.jar' to 'mod_cfml-valve_v1.1.10.jar'.
Your can download the file from from https://github.com/viviotech/mod_cfml/tree/master/java
(Thank you Zac Spitzer)
More Info here: https://github.com/viviotech/mod_cfml/issues/24