when will ColdFusion 10 (or higher) support apache 2.4?

Community Beginner ,
Oct 20, 2013 Oct 20, 2013

Copy link to clipboard

Copied

Hello,

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?

Thanks,

Jonathan Morgan

Views

5.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Engaged , May 28, 2014 May 28, 2014
Thanks, I'm aware of the current official support matrix, however the only LTS Ubuntu version there no longer gets updates for new hardware...

Likes

Translate

Translate
Explorer ,
Nov 06, 2013 Nov 06, 2013

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 06, 2013 Nov 06, 2013

Copy link to clipboard

Copied

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:

https://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration/_jcr_content/main-pars/download_1...

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:

http://www.cfdad.com/2013/10/27/how-to-compile-adobe-coldfusion-10-apache-connector-for-osx-maverick...

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2013 Nov 07, 2013

Copy link to clipboard

Copied

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:

    cd ./connector-source/native
    
  • change the "configure" script so it is executable:

    chmod 775 configure
    
  • figure out where your system's apxs (an apache program) is:

    which apxs
    
  • 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:

    ./configure --with-apxs=<apxs_path>
    

    so, for ubuntu 13.10, for example, the apxs path is /usr/bin/apxs:

    ./configure --with-apxs=/usr/bin/apxs
    
  • now, we fix problems with connector for apache 2.4:

    • in mod_jk.c (connector-source/native/apache-2.0/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:

    make
  • if no errors, newly compiled mod_jk.so should now be in connector-source/native/apache-2.0/ --> connector-source/native/apache-2.0/mod_jk.so

  • 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:

    • path_to_CF10_install = /opt/coldfusion10
    • magic_number for me has always been 1, but you might have to just go to the config/wsconfig and see what is there.
  • 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
    

    to:

    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
    

    to:

    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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2013 Nov 07, 2013

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 26, 2014 Jan 26, 2014

Copy link to clipboard

Copied

Thanks Jonathan,

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:


I've had the same issue. I need ColdFusion 8/9 for some clients which doesn't work with Apache 2.4

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 

And do:

sudo apt-get update sudo apt-get dist-upgrade

Grts,

Jonathan van Zuijlekom

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 26, 2014 Jan 26, 2014

Copy link to clipboard

Copied

2.4 is not supported now. News Live http://newslivein.com/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 27, 2014 Jan 27, 2014

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 27, 2014 Jan 27, 2014

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 28, 2014 May 28, 2014

Copy link to clipboard

Copied

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 ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 28, 2014 May 28, 2014

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 28, 2014 May 28, 2014

Copy link to clipboard

Copied

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...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 29, 2014 May 29, 2014

Copy link to clipboard

Copied

LATEST

OK, I got it to work on a fresh install.

Firstly

mv bin/cf-connectors.sh bin/cf-connectors-run.sh

so the connector installer stays out the way, then the file contents are

workers.properties:

worker.list=cfusion

worker.cfusion.type=ajp13

worker.cfusion.host=localhost

worker.cfusion.port=8012

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

JkWorkersFile /opt/coldfusion10/config/wsconfig/1/workers.properties

Then each virtual host needs

JkMountFile /opt/coldfusion10/config/wsconfig/1/uriworkermap.properties

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

JkLogFile /var/log/apache2/mod_jk.log

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 06, 2013 Nov 06, 2013

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 28, 2014 May 28, 2014

Copy link to clipboard

Copied

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"

                unpackWARs="true" autoDeploy="true"

                >

                <Context path="" docBase="/home/tchiverton/workspace/trunk" />

        </Host>

all the proxy'ed virtual hosts just return a bank page...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
May 28, 2014 May 28, 2014

Copy link to clipboard

Copied

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:-

http://wwwimages.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/cf11/coldfusion11-support-m...

Note- ** At the time of release for ColdFusion 11, the certified version of Apache was 2.4.7.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 28, 2014 May 28, 2014

Copy link to clipboard

Copied

Thanks, I'm aware of the current official support matrix, however the only LTS Ubuntu version there no longer gets updates for new hardware...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines