Change apache mpm to mpm-itk for CentOS7

I'm trying to run the mpm-itk module on CentOS. Unfortunately, that requires apache 2.4.7 while the current version on centos is 2.4.6, so compiling the module is out of the picture.

Alternatively, centos now offers the httpd-itk package which creates another apache binary (/usr/sbin/httpd.itk).

As per this article, one can set the HTTPD parameter in /etc/sysconfig/httpd to run apache through itk. However that is no longer the case with CentOS 7. Instead httpd uses /etc/httpd/conf.modules.d/00-mpm.conf to load whichever module you want. Except itk is not a module in this case but an executable!

How do I switch from using httpd at httpd.itk in this case?

Thanks!


For those still looking for a solution and/or getting AH00534: httpd: Configuration error: No MPM loaded when attempting to use ITK:

To use ITK, you should now:

  • yum install httpd httpd-itk
  • Edit /etc/httpd/conf.modules.d/00-mpm-itk.conf
  • Uncomment the #LoadModule line by removing the leading #
  • Do not comment out the LoadModule mpm_prefork_module line in 00-mpm.conf (this is where we got caught out)
  • Restart httpd

You should now see multiple httpd processes - this is different from CentOS 6 where processes ran as httpd.itk; if you access one that's configured to use a different user, you should see it switch to run as that user.

(Note also that there was also previously a bug with the httpd-itk, as filed on RedHat's Bugzilla: Bug 1188159 - Version mismatch between httpd-itk and httpd which prevented the use of httpd-itk)