I’m currently trying to get lucee working with Apache in RHEL docker container using mod_cfml.
These are the steps I followed.
Disclaimer: I might have done something wrong, as I don’t work with Linux OS on a day to day basis.
1. Installed Apache as root
2. Installed Lucee as root using the .bin installer with the apache connector.
3. This is how the httpd.conf looks like
<IfModule mod_proxy.c>
<Proxy *>
Allow from 127.0.0.1
</Proxy>
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
# optional mappings
#ProxyPassMatch ^/flex2gateway/(.*)$ http://127.0.0.1:8888/flex2gateway/$1
#ProxyPassMatch ^/messagebroker/(.*)$ http://127.0.0.1:8888/messagebroker/$1
#ProxyPassMatch ^/flashservices/gateway(.*)$ http://127.0.0.1:8888/flashservices/gateway$1
#ProxyPassMatch ^/openamf/gateway/(.*)$ http://127.0.0.1:8888/openamf/gateway/$1
#ProxyPassMatch ^/rest/(.*)$ http://127.0.0.1:8888/rest/$1
ProxyPassReverse / http://127.0.0.1:8888/
</IfModule>
LoadModule modcfml_module modules/mod_cfml.so
CFMLHandlers ".cfm .cfc .cfml"
ModCFML_SharedKey "secretcode"
LogHeaders true
LogHandlers true
LogAliases true
VDirHeader true
I have enabled logging for debugging purposes.
4. This is how my virtual hosts look like
<VirtualHost *:80>
DocumentRoot “/var/www/test”
ServerName localhost
DirectoryIndex index.cfm
RewriteEngine on
#RewriteRule ^(.)(/.)?$ ajp://{http_host}:8009$1$2 [P]
ErrorLog “logs/test-error_log”
TransferLog “logs/test-access_log”
5. Server.xml has the mod_cfml Valve added.
<Valve className="mod_cfml.core"
loggingEnabled="true"
maxContexts="200"
timeBetweenContexts="2000"
scanClassPaths="false"
responseCode="307"
sharedKey="secretcode"
/>
Error log from Apache
[Mon Dec 04 12:27:36.691184 2023] [modcfml:notice] [pid 3535:tid 139740668503808] URI => /index.cfm, filename => proxy:http://127.0.0.1:8888/index.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__
[Mon Dec 04 12:27:36.691187 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Host] => localhost:8087
[Mon Dec 04 12:27:36.691213 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [User-Agent] => Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
[Mon Dec 04 12:27:36.691217 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8
[Mon Dec 04 12:27:36.691222 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Accept-Language] => en-GB,en;q=0.5
[Mon Dec 04 12:27:36.691227 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Accept-Encoding] => gzip, deflate, br
[Mon Dec 04 12:27:36.691230 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Connection] => keep-alive
[Mon Dec 04 12:27:36.691232 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Cookie] => LUCEE_ADMIN_LANG=en; LUCEE_ADMIN_LASTPAGE=overview; cfid=d6caa506-b454-4ce9-9078-ec19386cfda3; cftoken=0
[Mon Dec 04 12:27:36.691235 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Upgrade-Insecure-Requests] => 1
[Mon Dec 04 12:27:36.691237 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Sec-Fetch-Dest] => document
[Mon Dec 04 12:27:36.691244 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Sec-Fetch-Mode] => navigate
[Mon Dec 04 12:27:36.691247 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Sec-Fetch-Site] => none
[Mon Dec 04 12:27:36.691249 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [Sec-Fetch-User] => ?1
[Mon Dec 04 12:27:36.691252 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [X-Tomcat-DocRoot] => /var/www/test
[Mon Dec 04 12:27:36.691258 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [X-Webserver-Context] => localhost-server-confl0
[Mon Dec 04 12:27:36.691262 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [X-ModCFML-SharedKey] => 95969e8fab994b2a24fc3a09ffd209513f630e7fa5ea59ec8e75db14940c8550
[Mon Dec 04 12:27:36.691264 2023] [modcfml:notice] [pid 3535:tid 139740668503808] Incoming header [x-vdirs] => /cgi-bin,/var/www/cgi-bin;/icons,/usr/share/httpd/icons;/.noindex.html,/usr/share/httpd/noindex/index.html;/poweredby.png,/usr/share/httpd/icons/apache_pb3.png;
[Mon Dec 04 12:27:36.691272 2023] [proxy:debug] [pid 3535:tid 139740668503808] mod_proxy.c(1265): [client 172.17.0.1:48572] AH01143: Running scheme http handler (attempt 0)
[Mon Dec 04 12:27:36.691280 2023] [proxy_ajp:debug] [pid 3535:tid 139740668503808] mod_proxy_ajp.c(764): [client 172.17.0.1:48572] AH00894: declining URL http://127.0.0.1:8888/index.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__
[Mon Dec 04 12:27:36.691289 2023] [proxy:debug] [pid 3535:tid 139740668503808] proxy_util.c(2353): AH00942: HTTP: has acquired connection for ()
[Mon Dec 04 12:27:36.691295 2023] [proxy:debug] [pid 3535:tid 139740668503808] proxy_util.c(2408): [client 172.17.0.1:48572] AH00944: connecting http://127.0.0.1:8888/index.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__ to 127.0.0.1:8888
[Mon Dec 04 12:27:36.691356 2023] [proxy:debug] [pid 3535:tid 139740668503808] proxy_util.c(2634): [client 172.17.0.1:48572] AH00947: connected /index.cfm?&&&&&&&&&&&&&&&&&&&& to 127.0.0.1:8888
[Mon Dec 04 12:27:36.691477 2023] [proxy:debug] [pid 3535:tid 139740668503808] proxy_util.c(3104): AH02824: HTTP: connection established with 127.0.0.1:8888 ()
[Mon Dec 04 12:27:36.691496 2023] [proxy:debug] [pid 3535:tid 139740668503808] proxy_util.c(3282): AH00962: HTTP: connection complete to 127.0.0.1:8888 (127.0.0.1)
[Mon Dec 04 12:27:37.193404 2023] [proxy:debug] [pid 3535:tid 139740668503808] proxy_util.c(2368): AH00943: : has released connection for ()
The error logs are not helping me at all
Don’t forget to tell us about your stack!
OS: ???
Java Version: ???
Tomcat Version: ???
Lucee Version: ???