Lucee Noob/CF experienced

252 views
Skip to first unread message

Jim Kinter

unread,
Jun 8, 2015, 12:57:27 AM6/8/15
to lu...@googlegroups.com
Noob Alert.
Just today found and installed Lucee on CentOS7 (64-bit) using Apache 2.4.6,  PHP 5.4.16. Tomcat 7.0.54

Took me a bit to find the *nix installer, but got it, ran it, took all defaults except password and log file.
Got an error towards the end:

Warning: Problem running post-install step. Installation may not complete correctly
 Error running /opt/lucee/sys/install_mod_cfml.sh -m install -l /opt/lucee -f /etc/httpd/conf/httpd.conf -c /usr/sbin/apachectl : Error: Nothing to do

But it APPEARS to be working...

Took me even a bit more to find /lucee/admin/web.cfm to admin the thing.

So now Im kind of at a loss on how to hook this up to CF web sites that I have migrated all to a new box.
They were all built and running on CFMX6, and moving to a new 64-bit system, I had to do something, and a friend turned me on to Lucee yesterday.
Im using the name-based hosting, and they all work currently, just those needing CF backend sit kind of dumb as a stump at the moment.

What needs to be done to get virtual name-based sites running through Lucee?

I would go and try to get hints from the old CFMX admin page on the old server, but well, it died a horrific death and I cannot get back into it anymore (hence the new machine up and coming). And silly me did not back up  the CF Admin stuff, as I figured I would be reinstalling it if something ever happened..
*forehead palm*

I understand *nix docs are a bit thin at the moment, and I would be glad to share what all I find (I could write up something for the Wiki, etc)
I just need this one thing to get me moving forward again.

Thanks
Jim

Igal @ Lucee.org

unread,
Jun 8, 2015, 1:21:04 AM6/8/15
to lu...@googlegroups.com
What needs to be done to get virtual name-based sites running through Lucee?
can you define "virtual name-based sites"?

in general you want to make sure that the Tomcat config files are set to process requests of your websites, and that they map the *.cfm url-pattern to the Lucee servlet.  the tomcat config files (server.xml and web.xml) are in {Tomcat}/conf/ folder.

the mod_cfml connector that comes with the installer makes life a bit easier.


I would go and try to get hints from the old CFMX admin page on the old server, but well, it died a horrific death
CFMX6??  looks like that death has put it out of its misery...

Igal Sapir
Lucee Core Developer
Lucee.org

--
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/0e9e0093-d134-4979-a5cc-22cdf1955ebb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jim Kinter

unread,
Jun 8, 2015, 9:23:49 AM6/8/15
to lu...@googlegroups.com


On Monday, June 8, 2015 at 12:21:04 AM UTC-5, Igal wrote:
What needs to be done to get virtual name-based sites running through Lucee?
can you define "virtual name-based sites"?

In Apache, you can set it up to serve multiple websites, either IP-based or Name-based.
With name-based, Apache sees the domain name being requested and looks at the config for that domain name, then uses the blob for that domain.
When IP-based it looks at the IP its coming in for, but name-based can have many on one single (or multiple) IP.

The config in httpd.conf looks like (I put all my web sites in a dir called /http/www/ compared to the default of /var/html/blah):

<VirtualHost {IPADDY-1}:80>
DocumentRoot /http/www/siteA
<Directory "/http/www/siteA">
allow from all
Options None
Require all granted
</Directory>
ServerName www.DOMAIN-A.com
</VirtualHost>


<VirtualHost {IPADDY-1}:80>
DocumentRoot /http/www/siteB
<Directory "/http/www/siteB">
allow from all
Options None
Require all granted
</Directory>
ServerName www.DOMAIN-B.org
</VirtualHost>

This way you can have many sites on a single IP (efficient use of addressing).
Of course if you have a shopping cart, etc with SSL certs, then you have to use individual IPs per site for the cert to work properly.

And then you put any specifics (CGI, redirects, etc) in each blob to control each site independently.

On the old server, CFMX6, Apache knew to send any "CFM" page to CF for processing, no matter where it was.
I didnt have to go and tell anything else what was where, so Im just confused/learning how Lucee/Tomcat is handling this kind of thing.

Trying to ski up the learning curve.....

Thanks
Jim

in general you want to make sure that the Tomcat config files are set to process requests of your websites, and that they map the *.cfm url-pattern to the Lucee servlet.  the tomcat config files (server.xml and web.xml) are in {Tomcat}/conf/ folder.

the mod_cfml connector that comes with the installer makes life a bit easier.

I noticed this morning (after the basic install last night) that Lucee had taken over darn near all my sites. What was working (either PHP-based Joomla or just static HTML sites) were all redirecting to the "Hey ! Lucee is working! Secure the server and web....." page. SO I had to go comment out the httpd.conf block at the bottom and restart apache.
 
#<IfModule mod_proxy.c>
#       <Proxy *>
#       Allow from 127.0.0.1
#       </Proxy>
.....
 

I would go and try to get hints from the old CFMX admin page on the old server, but well, it died a horrific death
CFMX6??  looks like that death has put it out of its misery...

Hey now ! :-) ... it was working just fine up until the RAID controller decided to start nuking the drives...(dont ask...long sad story..lol)
It wasnt that full featured, but it did its job and I had it tweaked to not crash or do weird things over the 8+ years.....

 

Tom Chiverton

unread,
Jun 8, 2015, 10:16:09 AM6/8/15
to lu...@googlegroups.com
This suggests the install could not configure the Apache plugin to automatically create virtual hosts in Tomcat. Has you're Apache config been updated at all ?

Tom

Jim Kinter

unread,
Jun 9, 2015, 2:12:17 AM6/9/15
to lu...@googlegroups.com
Just Yum updates, whatever that gets me.
This was a brand new build of CentOS7 into a Virtualbox VM last week.

[root@websvr conf]# /usr/sbin/httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Mar 12 2015 15:07:19

Is there some manual way to create the virtual hosts/fix the issue?
Something I should be looking for that needs fixing?

By the way, I sincerely appreciate any and all help I get here.
This looks extremely interesting to migrate into.
Im quite excited that I found this, I just need to get up to speed on the new way of doing things.

Thanks
Jim

Nando Breiter

unread,
Jun 9, 2015, 6:13:57 AM6/9/15
to lu...@googlegroups.com


Is there some manual way to create the virtual hosts/fix the issue?

Yes, certainly. Perhaps this might help?


Something I should be looking for that needs fixing?

If you still can't get it to work, I suggest posting more detail, such as configuration snippets and clear descriptions of what happens when you change something. Might be easier for others to help you that way. 

Igal @ Lucee.org

unread,
Jun 9, 2015, 1:32:48 PM6/9/15
to lu...@googlegroups.com
so to clarify...  are you able to run the sites on Lucee (without Apache)?  that should be your first goal, hit Tomcat directly at port 8080 or 8888 (not sure what the installer sets).


Igal Sapir
Lucee Core Developer
Lucee.org

--
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.

Jordan Michaels

unread,
Jun 9, 2015, 3:56:59 PM6/9/15
to lu...@googlegroups.com
Hi Jim,

The part of the installation that failed is the "glue" that copies over our Apache virtual hosts and creates contexts for them automatically in Tomcat. You can install this part manually if you need to, as there are detailed instructions over at modcfml.org:

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

Personally, I would be interested to know why the script failed. What happens when you run the script manually?

# /opt/lucee/sys/install_mod_cfml.sh -m install -l /opt/lucee
-f /etc/httpd/conf/httpd.conf -c /usr/sbin/apachectl

Do you get a more detailed error message?

The mod_cfml project as just recently been updated. The version that gets installed by the current Lucee installers is the slightly older mod_perl version. The newest version is now a native Apache .so module, so if you can, I'd recommend installing the latest version.

I apologize for not seeing this message earlier. I've been buried under a pile of other projects... ;) I will try to keep a closer eye on things.

-Jordan
--
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/0e9e0093-d134-4979-a5cc-22cdf1955ebb%40googlegroups.com.

Jim Kinter

unread,
Jun 10, 2015, 1:15:56 AM6/10/15
to lu...@googlegroups.com
Hi All.

I FINALLY got it working today ! Yeah me! :-)

I dont know why the install script barfed (I tried it 3 times, same result after scraping it all back out each time), but after a day or so of tweaking stuff, it magically appeared for one, then I was able to add the rest of the sites that use CF.

For those in the same boat, I have documented my steps:

Install Lucee:
wget http://railo.viviotech.net/downloader.cfm/id/133/file/lucee-4.5.1.000-pl0-linux-x64-installer.run

chmod 755 lucee-4.5.1.000-pl0-linux-x64-installer.run

./lucee-4.5.1.000-pl0-linux-x64-installer.run

(mine then errors out at the end)

At the bottom of httpd.conf, a block should have been added:

<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>

Add your virtualhost entries to httpd.conf as usual.

Then add a block to the bottom of /opt/lucee/tomcat/conf/server.xml for each domain/site (watch trailing slashes! and only change THINGS CAPITALIZED):

<Host name="DOMAIN.TLD" appBase="webapps">
    <Context path="/" docBase="/PATH/TO/WEBSITE/ROOT" />
    <Alias>www.DOMAIN.TLD</Alias>
</Host>


Then you have to add 2 directories for each site:

mkdir /{website root path}/WEB-INF
mkdir /{website root path}/WEB-INF/lucee

And then give them proper ownership
chown -R {lucee-user}:{lucee-user} {website root path}/WEB-INF
(you might have to add the user, if the script didnt, like in my case)

Then I restarted services in this order:

service tomcat restart
/opt/lucee/lucee_ctl restart
/usr/sbin/apachectl restart

Check and they should be working.
Tweak then as necessary

Hint: Once working, COPY/BACKUP the working httpd.conf and server.xml in case you break it, you can refer back to a known-good config !

I am quite anxious to get playing with features brought about since CFMX6 :-)

My humble Thanks to everyone who assisted!
Jim

Igal Sapir

unread,
Jun 10, 2015, 1:18:22 AM6/10/15
to lu...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages