Can ACF11 and Lucee coexist?

182 views
Skip to first unread message

Brian Lang

unread,
Mar 18, 2015, 4:23:36 PM3/18/15
to lu...@googlegroups.com
I have a OS X Yosemite install on which I have enabled the built-in Apache.
Into this environment, I have installed ACF11 since that's where I develop day-to-day.
I know enough about Apache to be dangerous, but I am most definitely not an expert.

Does anyone know if it's possible to setup Lucee in one virtual host under Apache, and disable ACF11 in that vhost. Right know, ACF is configured in httpd.conf via this line:
Include "/private/etc/apache2/mod_jk.conf"

I suspect I can I delete this line from httpd.conf and move it into each VHost file. Then in one VHost, I would be able to not include ACF and instead use the unzip version of Lucee.

Will this work? I don't want to mess around too much with my Dev environment, but I do want to start playing with Lucee.

Thanks in advance.

Nando Breiter

unread,
Mar 18, 2015, 4:33:26 PM3/18/15
to lu...@googlegroups.com
A simple option if messing around on your dev machine is to simply access Lucee via Tomcat at port 8080 (or 8888). Leave Apache out of it.

localhost:8080




Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

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

--
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/fce37025-5a89-469e-b02e-216473dc356f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Lang

unread,
Mar 18, 2015, 4:36:39 PM3/18/15
to lu...@googlegroups.com
Apache is already up and running with ACF. I need this to work and stay working as it's my primary Dev environment.

I just want to know if I can run Lucee in parallel without totally breaking the setup.

Nando Breiter

unread,
Mar 18, 2015, 4:50:24 PM3/18/15
to lu...@googlegroups.com
Running Lucee in parallel won't break a thing, as long as it is via another port. I assume you have Apache listening on port 80.

I have both engines running at this moment, and I often test code in both engines as I'm developing. In both cases I'm using the built in web server, so CF11 is on port 8500 and lucee is on port 8080. The only problem I've run into is running both in the same browser if it's an application that I log into. The solution (one solution) is to test such apps in different browsers. If you forget and find you can't login to your app on CF11, clear the cookies on localhost.

Since you are running CF11 via Apache, you most likely won't run into this issue, as you won't be using localhost to hit both engines. I think as long as the browser sees the domain as different for each engine, you'll be fine using the same browser for each.



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

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

Andrew Myers

unread,
Mar 19, 2015, 7:06:04 AM3/19/15
to lu...@googlegroups.com
It's definitely possible. However I suggest (if you're not already doing so) that you install ACF as a war on "vanilla" tomcat. ACF uses its own version of mod_jk which non-standard and therefore incompatible with the version you'd use with Lucee.

Alternatively you can use the ACF version of mod_jk and use mod_proxy_ajp For Lucee, but I have found mod_jk to be a better solution in my personal experience (in particular if you make use of rewrite rules it's much easier with mod_jk versus mod_amp_proxy).

In either case you should remove that include from the http.conf and put the appropriate connector info in the virtual host block for each instance - otherwise everything will go to the ACF instance.

Shout out if you need more info - I've done this a bunch of times recently and it's all fresh in my mind at the the moment.

Andy

Brian Lang

unread,
Mar 19, 2015, 12:53:04 PM3/19/15
to lu...@googlegroups.com
I am running the built-in Apache 2.4 in OS X Yosemite.

What is the "appropriate connector info" that I should put into each virtual host where I want to run ACF?

I tried simply moving the Include "/private/etc/apache2/mod_jk.conf" directive into the VHost file. If I put it outside the <VirtualHost> block, then it's included in the first VHost file that gets loaded and works for every Vhost. If I put it inside the <VirtualHost> block, Apache configtest tells me:
AH00526: Syntax error on line 4 of /private/etc/apache2/mod_jk.conf:
JkWorkersFile cannot occur within <VirtualHost> section
I'm new to configuring Apache beyond the very basics, so please be gentle :)

Sean Coyne

unread,
Mar 19, 2015, 2:27:49 PM3/19/15
to lu...@googlegroups.com
Only some of what is in the default mod_jk.conf file can go in a virtualhost block.

For example, I have a conf file that I include inside my virtual hosts block that looks like this:

JkMountFile /etc/apache2/coldfusion/uriworkermap.properties
AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf
Alias /CFIDE "/Applications/ColdFusion11/cfusion/wwwroot/CFIDE"
<Directory "/Applications/ColdFusion11/cfusion/wwwroot/CFIDE">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Files ~ ".hbmxml$">
Require all denied
</
Files>
DirectoryIndex index.cfm index.cfml index.html

then i globally include another conf file that looks like this:

LoadModule            jk_module  "/Applications/ColdFusion11/config/wsconfig/1/mod_jk.so"

JkWorkersFile        /etc/apache2/tomcat/workers.properties
JkShmFile            /etc/apache2/tomcat/jk_shm
JKIPRestrictionFile /etc/apache2/tomcat/iprestriction.properties

# custom environment variables
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

JkLogFile            /etc/apache2/tomcat/mod_jk.log
JkLogLevel            info
JkLogStampFormat    "[%a %b %d %H:%M:%S %Y] "

This allows me to configure each virtual host to use CF or not.

Then I have another conf file that I include in virtual hosts that should use Railo/Lucee which uses mod_cfml and looks like this:

DirectoryIndex index.cfm index.html index.cfml

<Proxy *>
Require local
</Proxy>
ProxyPreserveHost On
ProxyPassMatch ^/
(.+\.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2
ProxyPassMatch ^/flashservices/gateway(/.*)?$ ajp://localhost:8009/flashservices/gateway/$1$2
ProxyPassMatch ^/flex2gateway(/.*)?$ ajp://localhost:8009/flex2gateway/$1$2
ProxyPassMatch ^/rest(/.*)?$ ajp://localhost:8009/rest/$1$2

PerlRequire /private/etc/apache2/railo/mod_cfml.pm
PerlHeaderParserHandler mod_cfml
PerlSetVar LogHeaders false
PerlSetVar LogHandlers false
PerlSetVar CFMLHandlers ".cfm .cfc .cfml"

Hopefully this helps you

Brian Lang

unread,
Mar 19, 2015, 2:30:46 PM3/19/15
to lu...@googlegroups.com
This looks exactly like what I'm looking for. Will test it out later today and let you know.
Reply all
Reply to author
Forward
0 new messages