CFML not 'rendering' in new Lucee Install

We are working to convert an old ColdFusion application, currently hosted on Windows and SQL Server to Lucee with PostgreSQL

We have Lucee and PostgreSQL installed on our MAC OS server, and Lucee Admin is coming up correctly (cfm is rendered) - able to add datasources, mail server, etc… so Lucee appears to be working… except:

We moved our code base into a directory on the Lucee MAC, example: Macintosh HD/www/oursite

Our DNS is functioning to ‘oursite’ — meaning a basic HTML page (index.html) displays correctly when we go to the url.

Our issues are:

  1. When we go to http://oururl/index.cfm - the cfm is just coming up as plain text - not being rendered as CF

  2. If we try to go to any other .cfm in our site, such as News.cfm - we get a 404 Error from Tomcat, though the file is definitely there, and owned by the same user as the index.html mentioned above

We installed Lucee via Brew - if that’s helpful.

Can anyone provide us guidance on getting this working? We are ‘sort of’ new to the Linux world - we’ve always used Windows.

Many thanks,

Gary

Don’t forget to tell us about your stack!

OS: MAC OS
Java Version: ???
Tomcat Version: 9
Lucee Version: 5.3.4.80

try enabling Buffer Tag Body Output

That did not work, but I do appreciate you replying.

In this semi-screen shot, you can see what’s being displayed in the browser is just text, as if we were looking at the code in an IDE.

which webserver?

We are using Tomcat 9

so http://oururl/index.cfm doesn’t work, but http://oururl/lucee/admin/server.cfm does?

have you manually configured hosts in tomcat?

We are accessing the Lucee admin by IP, either a static IP of ours, assigned to this server, or by 127.0.0.1/lucee/admin/server.cfm - and both work fine.

The Lucee CFML engine should work across an entire server, as ColdFusion does/did in Windows — so that is to say, on the MAC/Lucee server, if we put our CFML for our site in /VOLUMES/Macintosh HD/www/oursite – the CFML engine of Lucee should recognize .cfm, .cfc etc and render them correctly.

In my example of http://oururl/index.cfm - that host is set up manually in Tomcat - and port forwarding is set up correctly on the MAC to forward port 80 to port 8080 — we know that and DNS are correct because when we go to our url - index.html displays the sample test page. So I don’t think it is an issue of the host setup in Tomcat, or the DNS entry.

You need to use mod_cfml - Homepage for that

No way. Their documentation is sub-standard to say the very least. That’s what you get when you use software that is open source.

For example: On their page: mod_cfml - Installation - Apache on Centos which we did, their last line is that we should be all set- ok - how? Do they bother to tell you how to use it? No.

Also, in their example setup, the last line is:

sharedKey=“secret key also set in the Apache/IIS config” />

But, this is Tomcat - NOT Apache or IIS - so why is that even in their example? What are you supposed to put in there for the sharedKey?

And what about this line in their documentation:

“Incoming requests that are sent to Tomcat should contain at least one additional HTTP request header, the “X-Tomcat-DocRoot” header. This will be placed there by one of the mod_cfml web server components, either mod_cfml.so or the BonCode Connector).”

There’s nothing in their site that explains where to put, how to use, mod_cfml.so

Did you even read the first paragraph? mod_cfml sits between the web server and tomcat and automates the creation of tomcat hosts

You need either a boncode connector for IIS or mod_cfml.so for Apache, they handle the webserver side of things, the valve connector handles the connection on the tomcat side. As the introduction also explains mod_cfml - Introduction

Except for these three pages…

https://viviotech.github.io/mod_cfml/install-lin-centos.html
https://viviotech.github.io/mod_cfml/install-lin-ubuntu.html
https://viviotech.github.io/mod_cfml/install-win-apache.html

Hope that helps

2 Likes

GaryNiederhelman We’ve removed your last message. It doesn’t reflect the sort of tone we want to see here in our friendly community. It’s ok to be frustrated, but not ok to direct those kinds of insults at people.

4 Likes