I just installed ubuntu 13.10, and it comes with apache 2.4, which means the next LTS of ubuntu will include apache 2.4. I also read that Fedora 18 and up come with apache 2.4, and so RHEL 7 could also use apache 2.4 instead of 2.2.
I understand that 2.4 is not supported now. When will ColdFusion support apache 2.4?
I'm having the same issue I upgraded to Ubuntu 13.10 and it comes with Apache 2.4 and although coldfusion 10 installs and runs just fine, the Apache2 server config did not work so my CFM pages wont get process. SUCKS!!! Please get this fix guys or send an email to someone so they can get your software working again.
Adobe has custom source for the apache-tomcat connector they ship with CF 10, so I think we are going to have to wait for them to support apache 2.4. To their credit, source available here:
I tried to recompile the stock tomcat apache connector against apache 2.4 and use that, but it didn't work. The server starts fine once you reconfigure CF apache files so they are 2.4-ready (see http://httpd.apache.org/docs/trunk/upgrading.html), but then you get a 500 error every time you try to access a CF page.
The tomcat built-in web server still works well, so I am using that for now.
I also found this link with directions on how to recompile the CF version of the connector to fix a problem on OS X 10.9:
This might work if you recompile the connector from adobe's source on your ubuntu box. If I get a chance, I'll try it out in the next day or so and report back.
Message was edited to add link to source for connector and for grammar by: jonathan_morgan
I had to change a few things in the mod_jk.c source file, but I got it to compile, and it seems to be working just fine with apache 2.4 on ubuntu 13.10. This is totally unsupported at this point, of course, but I've had no problems with it on my dev server in the brief time I've tested it. The changes were relatively minor, and on my ubuntu 13.10 dev server, the result is a working connector.
Here are the steps:
install apache2-dev or its equivalent (for ubuntu: "sudo apt-get install apache2-dev").
download source for mod_jk: https://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration/_jcr_content/main-pars/download_1...
unzip the archive somewhere where you can work on it.
go into the native folder:
change the "configure" script so it is executable:
chmod 775 configure
figure out where your system's apxs (an apache program) is:
This should result in a full path to the apxs command. If not, this used to be a sign that you had apache's threaded version installed instead of the prefork mtm. Used to be you'd install package "apache2-prefork-dev" to fix this (see http://ubuntuforums.org/showthread.php?t=1425646). Not sure how this would work in 13.10 with 2.4, but I didn't run into this problem.
using the path to the apxs executable from the "which" command, run the following command:
so, for ubuntu 13.10, for example, the apxs path is /usr/bin/apxs:
now, we fix problems with connector for apache 2.4:
in mod_jk.c (
replace all mentions of "
r->connection->remote_ip" with "
r->connection->client_ip" (lines 832 and 1106).
replace all mentions of "
r->connection->remote_addr" with "
r->connection->client_addr" (line 833).
use the following pattern to fix calls to ap_log_error (from http://httpd.apache.org/docs/current/developer/new_api_2_4.html):
/* code for httpd 2.0/2.2 */ ap_log_perror(file, line, APLOG_ERR, 0, p, "Failed to allocate dynamic lock structure"); /* code for httpd 2.4 */ ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, p, "Failed to allocate dynamic lock structure");
in the actual file, the lines changed (735 and 741) looked like:
// before ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, res); // after ap_log_error(file, line, APLOG_MODULE_INDEX, APLOG_ERR, level, 0, s, res);
update the actual build script so it is executable:
chmod 775 ./scripts/build/instdso.sh
run make to build the connector:
if no errors, newly compiled mod_jk.so should now be in
move existing mod_jk.so out of the way. In new terminal:
cd <path_to_CF10_install>/config/wsconfig/<magic_number> (sudo) mv mod_jk.so mod_jk.so.orig.bak
In ubuntu 13.10:
copy newly compiled version of mod_jk.so into place:
cp <path_to_connector-source>/native/apache-2.0/mod_jk.so <path_to_CF10_install>/config/wsconfig/<magic_number>/
so, if you are in the native directory, for a standard ubuntu install:
(sudo) cp ./apache-2.0/mod_jk.so /opt/coldfusion10/config/wsconfig/1/
restart apache and ColdFusion, then test.
In addition, you will need to update your site configuration when migrating from 2.2 to 2.4 (httpd.apache.org/docs/2.4/upgrading.html).
The things that got me that I made a note of:
change all instances of:
Order allow,deny Allow from all
Require all granted
change all instances of:
Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128
Require host 127.0.0.0/255.0.0.0 ::1/128
And, apache 2.4 on ubuntu changes the naming conventions of things in /etc/apache2/sites-available - they all now have to end in ".conf". So, if you have any custom sites in sites-available, you'll need to add ".conf" to the end of the file names there.
Also, I submitted this as an enhancement request. If you want to vote on it: https://bugbase.adobe.com/index.cfm?event=bug&id=3651785
The updated mod_jk.c file is there, too, if you want to just download that and not update it by hand.
I've succesfully downgraded to Apache 2.2 on Ubuntu 13.10, but this is even better.
If anyone is interested here is how to downgrade on Ubuntu 13.10:
You can use the Raring version of Apache 2.2 using the following steps
Create "/etc/apt/sources.list.d/ubuntu1304.list" with:
#Ubuntu 13.04 repro for instead of 2.4 deb http://nl.archive.ubuntu.com/ubuntu/ raring main
Create "/etc/apt/preferences.d/apache22" with:
Package: apache* Pin: release a=raring Pin-Priority: 500
sudo apt-get update sudo apt-get dist-upgrade
Jonathan van Zuijlekom
I can run CF 10 on Apache 2.4, but only the 32-bit version of Apache. ColdFusion uses a custom connector (that mod_jk.so), and there isn't one for the 64-bit version of the server.
That is interesting if they support it on 32-bit but not 64-bit...
If you follow the steps above, you can compile the connector on a 64-bit box. That is how I did it, and it has been running just fine since the beginnning of November on a 64-bit install of Ubuntu 13.10.
That's nice. Works much the same for CF9, but on a new install of CF10 I'm having an issue, that wsconfig wont run to create the /1/ folder, or create the required 'uriworkermap.properties'.
If I had a working CF10 install I bet I could just copy this and ignore the error from the CF10 startup script; could someone post the file and anything else that's in the /1/ folder by default ?
I had endless problems getting CF9 (or 10) installed on ubuntu 14.04. In the end, I just used the built in web server, since I'm just using it for development. But I liked it better when I had it setup on apache because it basically duplicated my hosting environment.
Yeah, I'm tyring to set it up with a proxy in Apache now, but Tomcat's virtual hosting configuration is doing my head in...
OK, I got it to work on a fresh install.
mv bin/cf-connectors.sh bin/cf-connectors-run.sh
so the connector installer stays out the way, then the file contents are
And I got uriworkermap.properties from flashservices/gateway and ColdFusion 10 | In Flagrante Delicto!
Then compile the modified connector and create a global Apache config that does
LoadModule jk_module /opt/coldfusion10/config/wsconfig/mod_jk.so
Then each virtual host needs
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
You could move this into a common snippet you Include in each. If you want CF9 side by side, you'll have to do something similar for mod_jrun as you can't RemoveHandler it out the way if it's applied globally.
Thanks for this. It looked so promising, but on my setup (cf10 + Apache 2.4 on Debian "Buster") I've not quite got there yet.
My symptom is that apache2 won't start. The key error is "Failed to attach 17176 to compat systemd cgroup /system.slice/apache2.service: No such file or directory" and if I look in the mod_jk.log, I find "[error] jk_map_validate_property::jk_map.c (395): The attribute 'worker.cfusion.max_reuse_connections' is not supported - please check the documentation for the supported attributes."
I think that a few newer versions of the connector have been introduced since you (assuming you're still around!) wrote that - and I'm not entirely sure what version of mod_jk you compiled. I might just have to take a guess and try with that.
But thanks for the inspiration...
So much at issue here.
Bottom line, you're holding together 10 year old tech with baling wire and duct tape. You may get it working, you may not.
Another option is to find a cf11 license on the open market, or move to cf2021 or 2018 (still updated, of course). And the folks who sell fusionreactor have a deal to offer an upgrade price for cf2021 from even cf10, which Adobe doesn't offer.
You can also consider Lucee, though some using Lucee just proxy to its web server, forgoing AJP, so again you need not change cfml engines just to do that.
But certainly being on such an old cf version as 10 should motivate you doing SOMETHING to be more updated, if only for security reasons. Again, many dismiss that concern out of priorities/pragmatism--which may ultimately be proven a false pragmatism, but some need to touch the burning iron to learn its lessons.
Hope that helps.
Ah, I have "good news" for you: Adobe DID roll Apache 2.4 support into cf10, as of update 14 released (like cf11) in 2014. Here's the technote that announced that.
You never indicated what cf10 update you were on. There were 23 total, again the last in 2017. If you have not updated beyond u14, just updating that would get you the 2.4 support you need.
I'd recommend AGAINST "just copying in the updated mod_jk.so" from some update you do elsewhre (or by extracting it from the updated wsconfig.jar). There's almost certainly correlating files or settings that would only be all in synch if you did do the cf 10 update 14 or above.
All that said, I still stand by all I offered above, especially the recommendation against remaining on cf10. But you may even feel it's "out of your hands", so i just wanted to share this more complete clarification of your options.
Wow, this is great! Thank you so much!
However, I can't actually run CF without a functioning connector, so there's a bit of a catch-22 here - how can I install the update, which seems to be something you have to use the CF Administrator for?
Yes, I should be updating to something more secure (eg. PHP!) but there's a bunch of legacy stuff that would be a lot of work to migrate. I'm painfully aware of that, and it will happen in time.
Perhaps upgrading to 2016 would be an idea, but just getting CF10 working is what I'm charged with right now.
Just a quick update to say that the key things was that I hadn't found the proper Adobe Coldfusion version of the connector. It is available here : https://cfdownload.adobe.com/pub/adobe/coldfusion/10.x/connector_source/CF10-U18-Connector-source.zi...
And it works!
So now I've got a functioning CF10 server, I should be able to apply all the updates.... Hopefully!
Now at /opt/coldfusion10/cfusion/lib/updates/chf10000023.jar
I applied mandatory update and then hotfix 23. I guess that's it.
Another solution if you don't want to mess with recompiling connectors is to have apache act as a reverse proxy to tomcat/CF -- this should be pretty straight forward to do if you only have one web site, but takes a bit more setup if you have multiple virtual hosts, see http://wiki.apache.org/httpd/TomcatReverseProxy for a starting point.
How much extra work per virtual host ? Is it like how Railo used to be and you just need to tweak the web.xml to add them to match Apache ?
I ask because if I add
<Host name="versiontwomessengertrunk-cf10.localdomain" appBase="webapps"
<Context path="" docBase="/home/tchiverton/workspace/trunk" />
all the proxy'ed virtual hosts just return a bank page...
Yes, now ColdFusion 11 is supporting Apache 2.4.x**.
You can check Web Server detail in ColdFusion 11 support matrix link, below is the link for same:-
Note- ** At the time of release for ColdFusion 11, the certified version of Apache was 2.4.7.
Thanks, I'm aware of the current official support matrix, however the only LTS Ubuntu version there no longer gets updates for new hardware...