Mod_cfml now has full nginx support!

mod_cfml logoA while back, I needed to set up a new Ubuntu server for Lucee web hosting. Luckily, I came across a great install script, which not only installed Tomcat and Lucee, but also set up nginx and mod_cfml.
Having developed the 1.1 version of mod_cfml, I noticed not all options for mod_cfml were yet available in the scripts. So I added path_info support, and now also added support for the X-webserver-context header.

The X-webserver-context header makes sure Tomcat / mod_cfml only creates one Host for each server-block/VirtualHost/web-context. Without this header, if you have multiple hostnames pointing to the same web context (eg server_name *;), Tomcat would create a new Host for each new hostname, which can take up quite some resources.

These additions have now been added into the github repository, and have become the basis for the new mod_cfml installation steps for nginx.

Mod_cfml now supports Apache httpd, IIS, and nginx, on all operating systems. I think we have come a long way now. If you're still missing something, let us know at

No Comments

Enable PATH_INFO on Nginx with Lucee and Railo

Nginx logoUpdate, 2 hours after posting (11-aug-2015 15:30): I pasted an older code snippet. The correct one is underneath. (nginx: [emerg] "proxy_set_header" directive is not allowed here ...)

While setting up a new Ubuntu server, I decided to install Nginx instead of Apache httpd, having been jealous at the easy config files nginx has. I was really happy to find out Pete Freitag already created install scripts for Nginx + Lucee + Tomcat + some other goodies.

One of the first problems I encountered after install, while moving existing sites to this new server, was the absence of cgi.PATH_INFO. Especially on this blog, it is used on each page, except for the homepage.
It took me a few hours of Googling and trying, and almost gave up, since all examples on how to enable it included the use of fastcgi. Which is not what I am using: I am proxying to Tomcat.

Main problem I encountered was the fact that the PATH_INFO header was just not proxied to (or picked up at?) the Tomcat backend, even while adding "proxy_set_header PATH_INFO /bla/bla" to the config.

Lucee logoThen, it suddenly hit me. For the modcfml project, contributor Bilal Soylu added support for PATH_INFO to his AJP connector for IIS, called the BonCode connector. AJP does not natively support sending the path_info header to the AJP backend.
What Bilal did in the BonCode connector, is adding a request header xajp-path-info, which contains the actual path_info on the IIS side. He also made sure the 3 opensource CFML engines Lucee, Railo, and BlueDragon, accept this incoming header as the fallback path_info source. For example, see Lucee's cgi.path_info implementation at Github. The header is supported in Railo since May 2012, according to the JIRA ticket.

So that's cool: we can use a different header to send to Tomcat, which will still be picked up as regular path_info by Lucee/Railo/BlueDragon!

The following nugget should be placed somewhere in your nginx config:

set $pathinfo "";
# if the extension .cfm or .cfc is found, followed by a slash and optional extra
if ($uri ~ "^(.+?\.cf[mc])(/.*)") {
    # remember the filepath without path_info
    set $script $1;
    set $pathinfo $2;
    # rewrite the url to match the filepath wthout path_info
    rewrite ^.+$ $script break;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $pathinfo;

After a reload of Nginx, your path_info should be working! If it isn't, let me know.

No Comments

Mod_cfml 1.1 is out – furiously fast, bugs smashed, and new features!

Logo Mod_cfmlMod_cfml is software which shares webserver configuration with Tomcat, eliminating the need to configure hosts (or websites) in Tomcat.
I am very proud to say that I had a major role in the current new release. I rewrote the Apache httpd component in native C, added new features, fixed bugs, and generally improved speed by a factor 5 to 10. That's at the moment when it's actually used by the way; on the first hit of a website after the server started up.

The Tomcat part is much improved:


  • Speed: creating a new host context now takes 1 second at most (5 – 10 times faster then before), because jar scanning is now disabled by default.
  • Speed: “waiting for context files”, the slow part of previous mod_cfml, is gone.
  • Speed and memory footprint: only one Tomcat Host container is created per Apache/IIS virtualhost. All aliases / default site hosts / IP-based hosts, are now added as aliases. Which takes about 200 milliseconds.
  • Thread safety bugs fixed

Apache connector improvements:

  • The Apache 2.4 connector is rewritten in C. No more need to install Perl, just compile or drop in the file, and add a few lines of config!
  • Full support for path_info. Previously, URLs like /some/page.cfm/id/123 would not work in Tomcat. With mod_cfml 1.1, now they do! Thanks to a great idea which was already implemented in the BonCode connector.
  • Security: a shared secret key implementation is added, to prevent unauthorized context creation.
  • Virtual directories, or “Aliases” in Apache, are now by default sent from Apache to Lucee, for the current request.

IIS connector:

The updated Documentation and Installation instructions can be found at


So… what are you waiting for? Install! Upgrade! And have fun with CFML!


p.s. if you're interested, the source code can be found at

No Comments

Railo is dead; long live Lucee!

Lucee logoBig news came from the Railo front the 29th of January: Railo is abandoned by it's founders, and the same code project will now live on as Lucee. The underlying code remains the same, but the name changes, as does the organizational type. The new site is

The commercial company The Railo Company became the copyright owner of Railo a few years ago, after investments done by some companies. Now it apparently lead to not much good. Even so bad, that the founders decided to "fork" (=~ copy) the project, and continue under a new name.

But, I have full confidence in the strength and continuous growth of Lucee, as the founders an community is samrt and strong. I hope we will all adjust to a new cool name, and say cheers to this new path for CFML!

Railo is dead; Long live Lucee!

P.s. My daughter's name is Luce, that's near-identical :-D


CFUG-NL meeting with Gert Franz and Bilal Soylu - 2 top-notch speakers in one evening!

My day couldn't be better... First thanks to Bilal Soylu, who told me a while back he would be kind-of-nearby The Netherlands in May 2014, and he was willing to do one of his always-awesome presentations! Bam, new CFUG-NL meeting planned for may 28, 2014.

And today I am chatting with Gert Franz, and the word CFUG drops. "I should come around once to do a presentation", Gert said. "You wouldn't happen to be in the vicinity around the 28th?" I replied. And bada-bing bada-boom, now we've got a super-awesome dual presentation evening!

If you're in The Netherlands may 28, 2014, then do come and check this evening out!

Notice in Dutch on, "Surprise!" :

Surprise! Gert Franz, CEO en boegbeeld van Railo, komt óók een presentatie geven! Dit wordt een avond om niet snel te vergeten, met 2 topsprekers op 1 avond!
Gert's presentatie Railo 5.0 and beyond kreeg vele lovende kritieken tijdens CF.Objective 2014, "it's just wow!". Dit is jouw kans om het zelf mee te maken!

No Comments