OSX El Cap, Apache2, Tomcat 8, Lucee 5

RESOLVED {sigh}

Well, I’m totally ready to kick my own a$$. The solution was way more
simple than I thought.

My (mis)understanding was that configuring the Lucee EXPRESS to use the
local Apache install on the mac just wasn’t going to work – that I had to
use the tomcat built-in web server. The tomcat web server, because it’s
based on Java, is in fact case-sensitive when it comes to filenames in the
URL – “Foo.jpg” is NOT the same as “foo.jpg” in the eyes of the ‘cat. This
is why I had given up on Lucee Express.

I do recall trying to get local Apache to work with Lucee Express, but
since so much time has passed since that attempt, I couldn’t begin to tell
you what I was doing wrong. I just know I couldn’t get it to work –
probably mucking with config files that I actually didn’t need to.

Anyway, the solution is simple as all heck… just configure virtual hosts in
apache as one normally would, as Apache needs to be told to proxy any
coldfusion requests to tomcat/lucee… like so:

<Directory “/Volumes/Storage/company/sites/_test-app/www”>
Allow From All
AllowOverride All
Options +Indexes
Require all granted
DirectoryIndex index.cfm

<VirtualHost :80>
ServerName “www-test-app”
ServerAlias "www-test-app.
...*.xip.io"
DocumentRoot “/Volumes/Storage/company/sites/_test-app/www”
<Proxy >
Allow from 127.0.0.1

ProxyPreserveHost On
ProxyPassMatch ^/(.+.cf[cm])(/.
)?$ ajp://localhost:8009/$1$2

Then on the other side, add a similar entry for the Tomcat server.xml file:





Then (damn it!!!) just start Apache and start Tomcat/Lucee. That’s it.
Tomcat will create the WEB-INF files in each virtual host specified. The
tomcat web server is still running on port 8888, and the ajp connector is
still running on 8009.

http://www-test-app gives the result via Apache (case-insensitive urls).

Since Apache has root permission to listen on port 80, it does so… and
passes CF requests on to port 8009.

BONUS: One can still test via the Tomcat web server…

http://www-test-app:8888 gives the result via Tomcat web server.

If one wanted to bypass/refrain from Apache and use the Tomcat web server,
completely self-contained, BUT not have to add “:8888” to all their urls,
homebrew for mac can install “haproxy” which, when run as root and
configured using a simple config file, can receive requests on port 80 and
forward them to port 8888.

For any NEW sites where the desire is to make sure file names are properly
specified in code (case sensitivity-wise), this would be my ultimate
solution. For legacy apps that were originally run on a case-insensitive
stack, the use of the local Apache web server is the way to go.

I guess this is the best of both worlds. I hate that I spent so long
screwing with it only to learn that the solution was so simple a monkey
could have figured it out.

And I very much appreciate everyone’s attempt to help.