Hey there - it is me again…
I am hoping someone can help me out with what I think is a mod_cfml usage issue…
And I think this is the root cause of the original scripts from my previous threadnot working, too.
I install Lucee by copying the JAR to /opt/lucee/current/
I install tomcat 9 via RPM
Install nginx via rpm
I have copied the mod_cfml jar to /usr/share/tomcat/lib
I have placed all the lucee.conf / luce-proxy.conf (from mod_cfml) into the nginx root directory
I have updated all my “sites.conf” to include
set $lucee_context "application1";
include lucee.conf;
I have copied the cfml_mod valve element into tomcat’s server.xml within the localhost’s configuration.
<Valve className="mod_cfml.core"
loggingEnabled="false"
waitForContext="5"
maxContexts="200"
timeBetweenContexts="2000"
scanClassPaths="false"
sharedKey="SHARED-KEY-HERE"
/>
I have updated the - everywhere, as required,
And I have inserted (via sed) directly into the lucee-server.xml a labels block.
where the context matches that in the site conf and the id is md5 hash of the webroot of the application’s web root.
<labels>
<label id="2619d11e4ba672a848b6e31624b075cb" name="application1"/>
<label id="033abba4218938f7aeb57b3aa523dd61" name="application2"/>
<label id="5e72cd3571965cf29811c5649c947cb8" name="application3"/>
<label id="1a456059fdd36b8560052cb5a2490e92" name="application4" />
</labels>
Despite all this - the contexts - do not appear in the Lucee admin.
Nor are they physically created on disk.
And this is where I ask for help, please : and as always THANKS
Here is my tomcat server.xml;
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
<!-- visit modcfml.org for details on mod_cfml configuration options -->
<Valve className="mod_cfml.core"
loggingEnabled="false"
waitForContext="5"
maxContexts="200"
timeBetweenContexts="2000"
scanClassPaths="false"
sharedKey="<mySecretHere>"
/>
</Host>
Here is my nginx.conf;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
}
Here is a nginx site config that is in /etc/nginx/conf.d
server {
listen 80;
server_name subdomain.domain.com subdomain.localhost;
root /web/directory1/myCFMLapp
set $lucee_context "application1";
include lucee.conf;
rewrite "^/([0-9a-zA-Z-\+/=]{20,})(/image\.png)?$" /web.cfm?vars=$1$2 last;
}
Don’t forget to tell us about your stack!
OS: Amazon Linux 2
Java Version: 11
Tomcat Version: 9
Lucee Version: 5.3.8.206