How do I get Lucee to process on all new virtual hosts in Linux

300 views
Skip to first unread message

JD Yeiter

unread,
Feb 11, 2016, 9:27:31 AM2/11/16
to Lucee
This is my second try at posting this...sorry if it's a duplicate...


I'm a double newbie in that I'm a longtime Windows user trying out Amazon Linux (EC2) and I'm a longtime ACF user trying out Lucee.  I like what I've seen so far, but I've hit a stumbling block that I can't seem to find the cure for...

Background: I used the Linux (64b) Lucee 4.5.2.018 install on an EC2 Amazon Linux instance...no problems or errors during install.  It installed mod_cfml and all the other goodies.  I've been able to log into the Lucee admin and add datasources.  I can place a test CFM file in the /opt/lucee/tomcat/webapps/ROOT directory and it executes perfectly.

The trouble started when I tried to place my app in /var/www/html.  I placed my files in /var/www/html and then set up a virtual host in httpd.conf.  The virtual host setting looks like this:

<VirtualHost *:80>
    ServerName amz.mywebsite.com
    DocumentRoot "/var/www/html/myfolder"
</VirtualHost>

I made the change to httpd.conf, restarted httpd and tomcat.

Then I try to browse to one of my CFM files (ex http://amz.mywebsite.com/tools/testing/testcust.cfm), I get a Lucee error that looks like this:

Lucee 4.5.2.018 Error (missinginclude)
MessagePage /tools/testing/testcust.cfm [/opt/lucee/tomcat/webapps/ROOT/tools/testing/testcust.cfm] not found
Java StacktracePage /tools/testing/testcust.cfm [/opt/lucee/tomcat/webapps/ROOT/tools/testing/testcust.cfm] not found
  at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:915):915

I get that the error above is telling me that any .cfm request is going to route to "/opt/lucee/tomcat/webapps/ROOT/", but I thought the purpose of mod_cfml was to monitor httpd.conf and auto-update tomcat.  

So, my question is:  how do I get Lucee to process on all new virtual hosts?


Thanks for helping!

-JD

Tom Chiverton

unread,
Feb 11, 2016, 9:45:46 AM2/11/16
to Lucee
I assume you have restarted Apache and Lucee ?

Are you sure the mod_cfml module is being used by your Apache ?

Tom

Igal @ Lucee.org

unread,
Feb 11, 2016, 10:21:29 AM2/11/16
to lu...@googlegroups.com
you should probably point to /var/www/html in the Context element for that website in the {Tomcat}/conf/server.xml file

Igal Sapir
Lucee Core Developer
Lucee.org

--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/bdea3bb3-2019-4fd5-97b4-6dda69b5768c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

JD Yeiter

unread,
Feb 11, 2016, 10:34:58 AM2/11/16
to Lucee
"I assume you have restarted Apache and Lucee ?"

Yes.


"Are you sure the mod_cfml module is being used by your Apache ?"

How would I go about checking this?  Like I said, I'm a noob to Linux and I find that I try to google everything.  The problem that I've found with Googling Linux issues is the range of answers you get based on the flavor of Linux you are using.

Tom Chiverton

unread,
Feb 11, 2016, 11:32:15 AM2/11/16
to lu...@googlegroups.com

On 11 February 2016 at 15:34, JD Yeiter <jdye...@jdyconsulting.com> wrote:
How would I go about checking this?  Like I said, I'm a noob to Linux and I find that I try to google everything.  

There should be a httpd.conf in /etc/ (either httpd or apache subfolder, then in conf).

Look for a line mentioning mod_cfml, which may be in a file mentioned by "Include" in the main config.

Also check the logs (/var/log/ apache or httpd normally).


--
Tom

JD Yeiter

unread,
Feb 11, 2016, 11:43:34 AM2/11/16
to Lucee
First...many thanks for your help!  It's great to have the community working hard for first-timers like me...really appreciate it!


No mention of "mod_cfml" in httpd.conf...only mention of "cfml" in httpd.conf is:


<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 ^/(.+\.cfchart)(/.*)?$ 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>


What am I missing?  What should appear in the httpd.conf file for mod_cfml?

-JD

Jordan Michaels

unread,
Feb 11, 2016, 3:47:51 PM2/11/16
to lu...@googlegroups.com
Hi JD,

There should be another section under the mod_proxy config you posted
that refers to mod_cfml. Since it's not there, it means mod_cfml didn't
install correctly for you.

This is almost certainly because of the following issue:
https://github.com/utdream/CFML-Installers/issues/74

Amazon Linux is a custom version of CentOS that Amazon tweaks a bit, so
the install_mod_cfml.sh script I wrote and tested on CentOS and Ubuntu
has a bug when run inside Amazon Linux.

You could verify the problem is the same by checking your Lucee
install.log file in your /opt/lucee/ directory. Most of the file is the
extraction log; the meat is close to the bottom of the file where the
install scripts are run.

Even if the install script failed, it doesn't mean you can't install
mod_cfml manually. Detailed documentation has been produced for mod_cfml
and is available on http://modcfml.org. Specifically, installing to a
CentOS-based system, you can follow this guide:

http://www.modcfml.org/index.cfm/install/web-server-components/apache-on-centos/

You won't need to do the install mod_proxy part since you already have
that, and the rest is pretty strait forward.

Give it a try, and if you run into any problems along the way, we're
here to help.

Warm Regards,
Jordan Michaels
> <javascript:>> wrote:
>
> How would I go about checking this? Like I said, I'm a noob to
> Linux and I find that I try to google everything.
>
>
> There should be a httpd.conf in /etc/ (either httpd or apache
> subfolder, then in conf).
>
> Look for a line mentioning mod_cfml, which may be in a file
> mentioned by "Include" in the main config.
>
> Also check the logs (/var/log/ apache or httpd normally).
>
>
> --
> Tom
>
> --
> Love Lucee? Become a supporter and be part of the Lucee project today! -
> http://lucee.org/supporters/become-a-supporter.html
> ---
> You received this message because you are subscribed to the Google
> Groups "Lucee" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lucee+un...@googlegroups.com
> <mailto:lucee+un...@googlegroups.com>.
> To post to this group, send email to lu...@googlegroups.com
> <mailto:lu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lucee/66504167-9cbd-436d-be83-7ad18cd5a862%40googlegroups.com
> <https://groups.google.com/d/msgid/lucee/66504167-9cbd-436d-be83-7ad18cd5a862%40googlegroups.com?utm_medium=email&utm_source=footer>.

JD Yeiter

unread,
Feb 11, 2016, 5:14:45 PM2/11/16
to Lucee
AWWWWWYEAH!

Jordan, that was my exact problem!  I followed the instructions provided by hippiex on https://github.com/utdream/CFML-Installers/issues/74....and now it's working flawlessly!

Thanks for the help everyone...hopefully, this will help the next poor schmo!

-JD
Reply all
Reply to author
Forward
0 new messages