Skip to main content
Participant
October 20, 2013
Answered

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

  • October 20, 2013
  • 3 replies
  • 7477 views

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

This topic has been closed for replies.
Correct answer ChivertonT

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

3 replies

Inspiring
May 28, 2014

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

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

ChivertonTCorrect answer
Inspiring
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...

pete_freitag
Participating Frequently
November 6, 2013

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.

Inspiring
May 28, 2014

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

Inspiring
November 6, 2013

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.

Participant
November 6, 2013

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/file.res/connector-source.zip

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

Participant
November 7, 2013

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/file.res/connector-source.zip

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