Multi-host Lucee / Ubuntu / Tomcat setup guide?

1,132 views
Skip to first unread message

Dan Councill

unread,
Apr 7, 2015, 4:33:53 PM4/7/15
to lu...@googlegroups.com
Does anyone have a multi host setup guide for Lucee?  I've been trying to cobble a test server together from various pages, and I seem to almost get it working, but ultimately I seem to hit a brick wall.

I started with Mike's Lemtl Vagrant box (https://github.com/mikesprague/vagrant-lemtl), which seemed like it was working, until I realized that it was basically a single site WAR deployment (no connectors, no creation of the WEB-INF files on the fly).

I moved on to Robert Munn's OSX guide, trying to adapt it to Ubuntu, and I got the default site working, but then once I add a host or try to set the context for the default site in server.xml, it stops working.

I then tried Sean Corfield's guide to setting up Railo from 2009 (http://corfield.org/entry/Railo_on_Tomcat__multiweb), but couldn't seem to get it working with modified Lucee commands.

At this point, nothing seems to be working correctly, with most attempts breaking once I change the directory to the actual site location, or it only being the individual WAR install, which won't work for what I am trying to do ( have an automated deploy that will set up datasources and mapped dirs on init across all sites).

Anyone have any guidance?

Thanks,
Dan

Andrew Dixon

unread,
Apr 7, 2015, 6:06:16 PM4/7/15
to lu...@googlegroups.com
Hi Dan,

Have you tried using the installer and then using either the connector that comes with the installer or mod_jk? Personally I prefer mod_jk as I've found mod_cfml a bit, well, ropey, but it has always been pretty straight forward to get working. 

Basically, install using the installer and tell it not to install the connector, download and install mod_jk and then configure Apache to use mod_jk for cfm, cfc, etc.. files, which I tend to do by having a "lucee.conf" file containing:

<IfModule mod_jk.c>
    JkMount /*.cfm ajp13
    JkMount /*.cfc ajp13
    JkMount /*.do ajp13
    JkMount /*.jsp ajp13
    JkMount /*.cfchart ajp13
    JkMount /*.cfm/* ajp13
    JkMount /*.cfml/* ajp13
    JkEnvVar REDIRECT_URL ""
    JkEnvVar REDIRECT_REMOTE_HOST ""
    JkEnvVar REDIRECT_PATH ""
    JkEnvVar REDIRECT_QUERY_STRING ""
    JkEnvVar REDIRECT_HTTP_ACCEPT ""
    JkEnvVar REDIRECT_HTTP_USER_AGENT ""
    JkEnvVar REDIRECT_REMOTE_ADDR ""
    JkEnvVar REDIRECT_SERVER_NAME ""
    JkEnvVar REDIRECT_SERVER_PORT ""
    JkEnvVar REDIRECT_SERVER_SOFTWARE ""
</IfModule>

And then including this file in the sites you want to be Lucee enabled, e.g.:

<VirtualHost *:80>
    DocumentRoot "/Library/WebServer/Documents/www.lucee-example.local"
    ServerName www.lucee-example.local
    <Directory "/Library/WebServer/Documents/www.lucee-example.local">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    Include conf/lucee.conf
</VirtualHost>

Then in the server.xml you need to add a host record:

<Host name="www.lucee-example.local" appBase="webapps">
    <Context path="" docBase="/Library/WebServer/Documents/www.lucee-example.local" />
</Host>

Once done restart Apache and Tomcat and you should be done.

If you are trying to do it from a pre-installed (e.g. os installed) Tomcat then you might find this Windows guide helpful as the process is essentially the same:

https://bitbucket.org/lucee/lucee/wiki/How%20to%20set%20up%20a%20Lucee%20Server%20on%20Windows

Hope that helps.


Kind regards,

Andrew
about.me
mso - Lucee - Member

--
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/8337abfb-8b7e-490a-a621-363316a8b85e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jordan Michaels

unread,
Apr 7, 2015, 7:08:26 PM4/7/15
to lu...@googlegroups.com
It's important to note that mod_cfml is not a connector in and of itself
at present. It's a helper application that operates alongside of
existing connector methods - including mod_jk. The installer uses either
mod_proxy_http or the BonCode connector by default.

It's also important to note that Paul K, Bilal, and Lucee have been
putting a lot of time into improving mod_cfml's functionality recently.
I'm ashamed to admit I haven't been very involved with that effort, but
I'm continually amazed at the ingenuity of our community. They're
significantly improving mod_cfml by improving performance, adding
built-in support for virtual directories, and Paul has created a
compilable c-module for Apache to remove the need for mod_perl as well
as support the additional functionality they've been working on.

I'm extremely interested to see if/how Denny implements it into the new
installers. =D

Warm Regards,
Jordan Michaels
> about.me <http://about.me/andrew_dixon>
> mso <http://www.mso.net> - Lucee <http://lucee.org> - Member
>
> On 7 April 2015 at 21:33, Dan Councill <dan.co...@gmail.com
> <mailto:lucee+un...@googlegroups.com>.
> To post to this group, send email to lu...@googlegroups.com
> <mailto:lu...@googlegroups.com>.
> <https://groups.google.com/d/msgid/lucee/8337abfb-8b7e-490a-a621-363316a8b85e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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/CAG1WijVT0enfUqQVr40jL0LodOyuS%2Bx4F-uzLMyvZ2xmSh42ng%40mail.gmail.com
> <https://groups.google.com/d/msgid/lucee/CAG1WijVT0enfUqQVr40jL0LodOyuS%2Bx4F-uzLMyvZ2xmSh42ng%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Andrew Dixon

unread,
Apr 8, 2015, 3:33:28 AM4/8/15
to lu...@googlegroups.com
Hi Jordan,

That sounds really good and interesting to know it has been being worked on recently. In the past I've had issues with mod_cfml serving up the wrong sites, particularly during startup and also taking an extremely long time to start up in the first place. Hopefully someone can post in the forum when a new version is available.

Kind regards,

Andrew
about.me
mso - Lucee - Member

--
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
--
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+unsubscribe@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/55246366.2090509%40viviotech.net.

Dan Councill

unread,
Apr 8, 2015, 7:49:03 AM4/8/15
to lu...@googlegroups.com
Andrew,

Thanks so much for the suggestion.  I'll give it a shot and report back, but I was trying to just get Tomcat and Lucee working with multiple sites and a common Lucee core before I even looked at the HTTP side (I was going to try and use Ngnix, but I hadn't even gotten to that point).

Phil

unread,
Apr 8, 2015, 8:14:04 AM4/8/15
to lu...@googlegroups.com
Hi Dan,

Have you seen this one?

https://github.com/getrailo/railo/wiki/Ubuntu-12.04-Railo-4-with-Tomcat7-multi-instance

I followed something like this initially and then enhanced it over a couple years.  For example, you can externalise the listening ports into java variables and pass them in via env variables so you don't need a separate server.xml/web.xml per node.

Phil

Dan Councill

unread,
Apr 8, 2015, 11:06:52 AM4/8/15
to lu...@googlegroups.com
Just an update, I've started with a fresh Ubuntu box, and the 64 bit installer.

1. I install using most defaults, specifying password, etc.
2. Install done, I check NMAP, no Java ports are running (strange, I would think Lucee would be up at this stage).
3. Go to opt/lucee and restart Lucee.
4. nmap shows ports available, I go to localhost:8080 and I get the splash screen. Great!
5. I click the server link to make sure I can log in to the admin, and everything just spins.
6. I check nmap, no more Java.
7. I check /var/log, I don't see where I would see any Lucee errors, check the syslog.
8. Memory errors, out of the box.
9. Restart lucee, everything is working again!
10. Got to admin, but I have the set password screen.  Why did the installer ask for a password then?
11. Pressing on.  Add a /testsite1/ in the /opt/lucee/webapps folder, change permissions on the folder to lucee:lucee, add host record to server.xml.
12. Restart lucee to pick up changes
13. No java.  Catalina.out doesn't seem to have anything helpful either.
14. Restart lucee again (no changes). We have java!
15. Log into admin again, see 2 web contexts, cautiously optimistic.
16. Java is down again. Restart lucee
17. Can get to both lucee admins, great!  Let's test a datasource to see if it's shared between the two instances. Click add datasource.
18. Java down again.

That got a bit long, but I just wanted to show what I'm experiencing just for a proof of concept vm.  At this point, I'm afraid to keep going forward since I won't know if it's crashing b/c of a config issue for the install or if it's b/c of something I did.  I realize that, at least on the Ubuntu side of things, you have to dig a bit to get to the root of things, but at this point I haven't really done anything but installed the app out of the box, with the default configuration.

I'll keep the box as is for now, but I'm going to try the Railo guide from the link below for a bit.  Let me know if anyone knows where to look to figure out why the new install seems so unstable, and where it would log the crash reason.

Thanks,
Dan
Message has been deleted

Terry Whitney

unread,
Apr 8, 2015, 11:53:40 AM4/8/15
to lu...@googlegroups.com

I have found that Ubuntu does  non-standard things in terms of support from version to version.

Usually a lot of the guides published are only useful if you are using either software that happens to be in common distribution at that exact time, or if you are a LINUX guru and are willing to invest a few hours into making the changes necessary to make it work.


I have used this as a point of reference in the passed and it worked for me.


Dan Councill

unread,
Apr 8, 2015, 2:48:06 PM4/8/15
to lu...@googlegroups.com
I started a fresh vagrant box with these instructions(https://github.com/getrailo/railo/wiki/Ubuntu-12.04-Railo-4-with-Tomcat7-multi-instance) converted for Lucee and have a *very* basic example working with Nginx.  So far I've tested a datasource shared across all instances, with custom index.cfms being served up for each host.

I appreciate everyone's feedback on this!

Bill Tindal

unread,
Jun 22, 2015, 11:23:27 PM6/22/15
to lu...@googlegroups.com
Dan,

Can you actually post what you did / changed?

cheers,
Bill

Pete Freitag

unread,
Jun 23, 2015, 12:55:27 PM6/23/15
to lu...@googlegroups.com
On Tue, Apr 7, 2015 at 4:33 PM, Dan Councill <dan.co...@gmail.com> wrote:
Does anyone have a multi host setup guide for Lucee?  I've been trying to cobble a test server together from various pages, and I seem to almost get it working, but ultimately I seem to hit a brick wall.

I haven't updated it for Lucee yet, but I have some scripts that do most of the work in setting up a Railo / Ubuntu / nginx setup: https://github.com/foundeo/ubuntu-nginx-railo It should be pretty easy to port to Lucee, just have it download the lucee jars instead of the railo jars, and then rename directories from railo to lucee. I just haven't had time to make and test the changes yet.

The thing that I like about the script is that it uses the Ubuntu distribution for Tomcat so you can keep it up to date using apt-get.

--
Pete Freitag





Jonathan van Zuijlekom

unread,
Jul 6, 2015, 3:51:36 PM7/6/15
to lu...@googlegroups.com
I use nginx (tengine fork) with tomcat and lucee. I use mod_cfml and the custom http header to do multi-hosts on the fly.

Feel free to look at the attached lucee.sh script and config files. 
lucee-server.7z

online...@gmail.com

unread,
Nov 16, 2016, 3:32:36 AM11/16/16
to Lucee
Hi @jonathan, is this portable to a Windows / IIS environment?

Op maandag 6 juli 2015 21:51:36 UTC+2 schreef Jonathan van Zuijlekom:
Reply all
Reply to author
Forward
0 new messages