I have an .htaccess file in a /reports/ folder with the following rule:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm?path=$1 [L,QSA]
There is an index.cfm in the /reports/ folder that loads a list of all manufacturers, if one is not specified in ?path=
This is the error received when visiting one of the pages with /make/ in the URL
HTTP Status 403 – Forbidden
Type Status Report
Description The server understood the request but refuses to authorize it.
Apache Tomcat/9.0.21
I'm on CentOS 7 with Apache 2.4.
I have another site on the server that uses a RewriteRule in the vhost.conf file and that works fine in dev, staging and production.
If I change the RewriteRule to this, it redirects fine.
RewriteRule ^(.*)$ https://google.co.uk [L,QSA]
If I visit the page directly (/reports/?path=BMW/) the page loads fine.
The only thing I've been able to find is the mod_jk.log has this error when I try to load the BMW (or any other) report:
[warn] ajp_process_callback::jk_ajp_common.c (2245): (cfusion) AJP13 protocol: Reuse is set to false
This error occurs on CF Update 10 but not on Update 5 (my dev/staging servers needed updating from 5, and when I did they aslo started failing like the production server). Does anyone have any idea what "Reuse is set to false" means? And if that's related to something that would stop my RewriteRule from working?
I've tried searching the Tomcat source code and I can't find "reuse is set to false"
I've found a "DisableReuse" flag in the Tomcat docs, but I can't find mention of that on dev, staging or production servers.
I tried setting JkOptions -DisableReuse
in /etc/httpd/conf/mod_jk.conf
and restarted Apache, that made no difference.
I can't find the difference between the 2 working servers and the one failing to rewrite to CFM pages, other that the "reuse is set to false" log entry.
- Coldfusion 2018,0,10,320417
- Amazon Coretto (Java) 11.0.8
- Tomcat 9.0.21.0
- Apache 2.4.6
- Centos 7.7.1908
0 Answers