Testing code on multiple CFML engines

98 views
Skip to first unread message

Steven Durette

unread,
Jun 1, 2015, 9:47:29 AM6/1/15
to lu...@googlegroups.com
Hi all, 

I know I've seen this somewhere but I can't find it now.  I have a need to test code against ACF, Railo, and Lucee because I have to prove that the code will work as expected on all three.  Currently we have a production server with ACF9.01, a development server with Railo 4.2.1.008, and I'm trying to get approval for the next production server to be on Lucee.

All that being said, does someone have a tutorial on installing ACF, Railo, and Lucee on the same machine and having them all use the same CFML codebase?  Currently the machine I want to do this on had Railo 4.2.1.008, IIS, and Windows 7 64 bit.    I have no issues with switching to Apache for the webserver if needed.  What I was hoping to do in the end is use host-headers so I could test.  For example; local-railo.mysite.com, local-acf.mysite.com, local-lucee.mysite.com

If anyone can point me to a tutorial for installing them side by side it would be appreciated.

Also, if this is a double post, I apologize.  I lost my internet connection the first time I was trying to post this.

Thanks,
Steve

Nando Breiter

unread,
Jun 1, 2015, 10:30:42 AM6/1/15
to lu...@googlegroups.com
Hmmm, no tutorial, but here's a piece you might need:


What I do is use the built-in webservers on each and then change the location of the webroot. If you wanted to use a local url for each, then take a look here toward the bottom in the Configure the Sites section:


Changing the webroot on Railo or Lucee is simply a matter of setting the docBase on the Context tag within your host declaration within server.xml

<Context path="" docBase="/Users/abellas/tmp/apache-tomcat-8.0.3/sites/site1" />

 ... also shown in the above tutorial. 

The only thing you'll need to do is ensure Railo and Lucee are running on different ports. The port setting you need is also in server.xml, it looks like this:

 <Connector port="8888" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

You need the one with protocol="HTTP/1.1" and then of course you'd access this server via localhost:8888/ or url.local:8888/

Personally, I wouldn't mess with Apache or ISS locally - one less layer to configure.

One other thing. ACF sessions can fail if you hit both ACF and Railo or Lucee in the same browser from the same url, which would be the case if you simply use localhost:port/site1, localhost:port/site2, etc. In case sessions stop working on ACF, you'll need to clear the localhost cookies. To avoid this problem, I use a different browser for ACF.

No, wait, there's one more thing ... if you really need to avoid port numbers in your local urls, then use Nginx as your local webserver. The reverse proxy setup is very easy to configure for multiple engines. See here:


Hope that helps ...



--
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/a76b1aef-57d7-4542-8e4b-a05cf71befc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Skaggs

unread,
Jun 1, 2015, 10:36:43 AM6/1/15
to lu...@googlegroups.com
You also might be able to accomplish this by deploying a WAR of each engine into Tomcat, setting Tomcat to keep its WEB-INF folder in a separate location (rather than in the root of the site files) and then configuring 3 different Apache VHOSTS that all use the same document root, but proxy to the different engines.

Nando Breiter

unread,
Jun 1, 2015, 10:44:05 AM6/1/15
to lu...@googlegroups.com
In my experience, the WEB-INF folders of railo and lucee can co-exist in the same location (as long as both engines are run under the same user). On ACF, you an alias in the Context tag to set the location of the WEB-INF as I explain in my blog post.



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Terry Whitney

unread,
Jun 1, 2015, 11:23:53 AM6/1/15
to lu...@googlegroups.com
I have found the better solution is to create a network drive, share it (technology does not really matter) 

Next mount / link all your engine servers so they can see the network drive
I would suggest its one off your root, so your Web-INF or other files get stored locally on the engine server, where as the mounted directory is pure code

thats it. I would use virtual machines as its easy to spin up new servers as needed.

And if you are running any code that does file creation, deletion or edits, you need to make the permissions as universal as possible for your test environments.  This wills ave you hours of wondering why it works on X&Y but not Z.

Adam Chapman

unread,
Jun 3, 2015, 7:13:11 PM6/3/15
to lu...@googlegroups.com
There is a clever chap named Singgih who wrote automated tests for the CFWheels framework on all CFML engines using Maven and travis-ci..

http://blog.sidic.net/2014/06/how-to-test-cfwheels-app-step-by-step.html
Reply all
Reply to author
Forward
0 new messages