Upgrading to httpd 2.2.6 on RHEL and CentOS

September 12, 2007 by · 71 Comments 

Whew! Given that it's been 8 months since the release of Apache's httpd 2.2.4 I was starting to wonder whether or not the httpd developers were on an extended vacation. That said, they've just released version 2.2.6 of their wonderful web server. That vacation theory must have been wrong, given that they skipped version 2.2.5 (something that is rarely done) and went straight to 2.2.6. This release is a big one, fixing five potential security issues and numerous bugs to provide a more stable platform.

There's really not much more to say about this release other than "yum update" for my repo users or "download the src.rpm and get to compiling" for everyone else. If you decide to throw caution to the wind and build the src.rpm keep in mind that you shouldn't be building as 'root' (I know some of you do this anyway, despite my warnings, as I recently received an email asking for assistance from just such a person) and that you will need to fill dependencies on apr & apr-util before you can start (both of which are contained as binaries in my repo).

Have fun!

UPDATE (9/13/2007): The src.rpm and the binary rpms in the repo have been respun to fix a path issue with mod_ssl. If you don't use that package then you don't need to update. Likewise, if you had a valid key and certificate on your system BEFORE installing this version then you don't need to upgrade. This bug SHOULD have only affected new users who had never installed mod_ssl.

httpd 2.2.6 Changelog

Update (9/24/2009): Packages deleted, use the yum repository instead.


71 Responses to “Upgrading to httpd 2.2.6 on RHEL and CentOS”
  1. Jesse says:


    There seems to be an issue with httpd update. See below output.

    Updated: httpd.x86_64 0:2.2.6-jason.1
    Dependency Updated: httpd-manual.x86_64 0:2.2.6-jason.1 mod_ssl.x86_64 1:2.2.6-jason.1

    [[email protected] init.d]# ./httpd restart
    Stopping httpd: pidof: invalid options on command line!

    pidof: invalid options on command line!

    Starting httpd:
    [[email protected] init.d]#

  2. Jason says:


    Did you install the EL4 or EL5 version? Have you tried "service httpd restart" instead of the method you typed? What "mod_" packages do you have installed?

  3. Jesse says:


    Installed EL4 version Here's a list of loadmodules...

    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule auth_digest_module modules/mod_auth_digest.so
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authn_alias_module modules/mod_authn_alias.so
    LoadModule authn_anon_module modules/mod_authn_anon.so
    LoadModule authn_dbm_module modules/mod_authn_dbm.so
    LoadModule authn_default_module modules/mod_authn_default.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule authz_owner_module modules/mod_authz_owner.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_dbm_module modules/mod_authz_dbm.so
    LoadModule authz_default_module modules/mod_authz_default.so
    LoadModule ldap_module modules/mod_ldap.so
    LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
    LoadModule include_module modules/mod_include.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule logio_module modules/mod_logio.so
    LoadModule env_module modules/mod_env.so
    LoadModule ext_filter_module modules/mod_ext_filter.so
    LoadModule mime_magic_module modules/mod_mime_magic.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule deflate_module modules/mod_deflate.so
    LoadModule headers_module modules/mod_headers.so
    LoadModule usertrack_module modules/mod_usertrack.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule dav_module modules/mod_dav.so
    LoadModule status_module modules/mod_status.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule info_module modules/mod_info.so
    LoadModule dav_fs_module modules/mod_dav_fs.so
    LoadModule vhost_alias_module modules/mod_vhost_alias.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule actions_module modules/mod_actions.so
    LoadModule speling_module modules/mod_speling.so
    LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule cache_module modules/mod_cache.so
    LoadModule suexec_module modules/mod_suexec.so
    LoadModule disk_cache_module modules/mod_disk_cache.so
    LoadModule file_cache_module modules/mod_file_cache.so
    LoadModule mem_cache_module modules/mod_mem_cache.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule php5_module modules/libphp5.so
    LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    LoadModule ssl_module modules/mod_ssl.so

    Tried the "service httpd restart"...
    [[email protected] sbin]# ./service httpd restart
    Stopping httpd: pidof: invalid options on command line!

    pidof: invalid options on command line!

    Starting httpd:
    [[email protected] sbin]#

  4. Jason says:

    I looked into this last night and it seems like the problem is actually with mod_ssl. can you try removing mod_ssl and then seeing if httpd will start? Can you also check for the presence of "localhost.key" in "/etc/pki/tls/private" and "localhost.crt" in "/etc/pki/tls/certs"? If httpd starts without mod_ssl installed and those two files are missing then I've got the fix here and I'll roll out new packages.

  5. Jesse says:

    Don't even have a "/etc/pki/tls/" directory. Only one thats there is "/etc/pki/rpm-gpg/". The only .key and .crt files I have on the server are "/etc/httpd/conf/ssl.key/server.key" and "/etc/httpd/conf/ssl.crt/server.crt".

    As soon as I can disable mod_ssl and restart httpd, I'll let you know the status of that.

  6. Jason says:


    Yeah, you don't actually need to remove mod_ssl, just move the "ssl.conf" file out of the "/etc/httpd/conf.d" folder and then try and start httpd.

  7. Jesse says:


    [[email protected] conf.d]# mv /etc/httpd/conf.d/ssl.conf /home/jesse/
    [[email protected] init.d]# ./httpd restart
    Stopping httpd: pidof: invalid options on command line!

    pidof: invalid options on command line!

    Starting httpd:
    [[email protected] init.d]#

    It looks like it's having issues stopping 2.2.4 version of apache in order to start 2.2.6.
    I killed the old httpd process manually and tried starting it.

    [[email protected] init.d]# ./httpd start
    Starting httpd: Syntax error on line 112 of /etc/httpd/conf.d/ssl.conf:
    SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty
    [[email protected] init.d]#

  8. Jesse says:


    Here's the steps i had to do in order to resolve this issue:

    1. Manually kill the old httpd processes running after "yum upgrade"
    2. Adjust SSLCertificateFile to "/etc/httpd/conf/ssl.crt/server.crt"
    3. Adjust SSLCertificateKeyFile to "/etc/httpd/conf/ssl.key/server.key"
    4. Start httpd

    It's now running 2.2.6. I had originally did a yum upgrade using your files to get to 2.2.4 if that helps any debugging the issue.

  9. Jesse says:

    On a side note...i noticed that openssl and openssh are running pretty old versions. Anyway you could provide newer yums for these?

  10. Jason says:


    How, exactly, did you get 2.2.4 AND 2.2.6 installed at the same time? If you had 2.2.4 installed using RPMs then it should have been removed when 2.2.6 was installed. Strange...

    In any case, yes, I know about the SSL cert issue that you ran into. Revision "jason.2" will stick localhost.key/.crt in the "correct" locations. It'll be up soon.

    As to updating OpenSSL & OpenSSH, I doubt that that will be something that I'll do. There are a ton of packages that are dependent on OpenSSL and OpenSSH isn't part of the LAMP stack (which is what I'm focusing on here).

  11. Jesse says:

    All I did was "yum upgrade httpd.x86_64" while 2.2.4 was still running. After the upgrade was complete I tried to restart httpd and then started getting the errors mentioned above.

  12. Jesse says:


    Delete empty post...sorry.

    I noticed that you made .2 available.

    [[email protected] jesse]# yum install mod_ssl.x86_64
    Updated: mod_ssl.x86_64 1:2.2.6-jason.2
    Dependency Updated: httpd.x86_64 0:2.2.6-jason.2 httpd-manual.x86_64 0:2.2.6-jason.2
    [[email protected] jesse]# cd /etc/init.d/
    [[email protected] init.d]# ./httpd restart
    Stopping httpd: pidof: invalid options on command line!

    pidof: invalid options on command line!

    Starting httpd:
    [[email protected] init.d]# I manually killed all of the httpd processes that were running...
    [[email protected] init.d]# ./httpd start
    Starting httpd: [ OK ]
    [[email protected] init.d]#

  13. Jason says:


    That is not something I have been able to replicate on any of my systems. I am still unable to get both 2.2.4 and 2.2.6 installed at the same time (I don't see how this could be possible if both versions were installed using my RPMs) and I am unable to locate "pidof" in the init script (meaning that what you have is not the same as what I have).

    What is the output of "rpm -qa | grep httpd"? What is the output of "md5sum /etc/init.d/httpd"? If the former includes more than one version of httpd or the latter does not equal "3088496c51da50439e4cf025f2b59733" then I would recommend completely removing httpd from your system and then doing a clean install.

  14. Jesse says:

    [[email protected] jesse]# rpm -qa | grep httpd
    [[email protected] jesse]# md5sum /etc/init.d/httpd
    3088496c51da50439e4cf025f2b59733 /etc/init.d/httpd
    [[email protected] jesse]#

    Got me. I can upgrade, the only thing I have to do is manually kill the apache processes after the yum upgrade. Once I do this, then I can start the new httpd process.

    Maybe add to your yum upgrade of httpd to stop the current httpd and then start the new one.

  15. Jason says:


    Stopping and restarting httpd when the RPM is updated won't fix your issue as actually stopping httpd seems to be your problem (and it would likely result in long downtimes for the users where this actually worked if a large number of packages were updated at the same time).

    Again though, "pidof" does not appear anywhere in the init script for httpd. It does appear numerous times in "/etc/init.d/functions" so if you have modified that file (md5: 00a20a2b158df3eda46c2d723eab4d9c) or aren't using the correct version of the SysVinit package (should be SysVinit-2.85-34.4 for EL4) then that could be causing your issues.

  16. Jesse says:

    9477f04c5638317aa9a6baad6d3cac00 /etc/init.d/functions
    -rwxr-xr-x 1 root root 10722 Apr 18 2005 functions

    I haven't manually edit this file.

    As far as SysVinit goes, I was running 2.85-34.3...just upgraded to 2.85-34.4. Functions file still the same after running the upgrade.

  17. Jesse says:


    It looks like the issue is with anytime i try to do "/etc/init.d/httpd restart". I get the following error:

    Stopping httpd: pidof: invalid options on command line!

    pidof: invalid options on command line!

    Starting httpd:

    What's the best way to remove the current httpd and reinstall.

    Also, i just upgraded php to 5.2.4-jason.2 and noticed that php-dbase is still at .1 version.


  18. Jesse says:

    Looked in "/var/log/messages" and saw: "Sep 18 10:07:15 localhost httpd: -d shutdown failed"

  19. Jesse says:

    It has to be an issue with /etc/init.d/httpd...i did "/usr/sbin/apachectl restart" and it works perfectly.

    Anyway you could email me the functions file and httpd file so i can compare to my system?

  20. Jason says:


    Again, there is nothing wrong with the httpd initscript as it does not even use "pidof". It would seem that your problem is the "/etc/init.d/functions" file as all of my systems (RHEL & CentOS 4) have that file with an md5sum of 00a20a2b158df3eda46c2d723eab4d9c.

    I misspoke earlier when I said this file was from "SysVinit" as that is incorrect. It is actually a part of "initscripts". The version I currently have installed is "initscripts-7.93.29.EL-1.centos4". If that is not the version you have, you may want to revert.

    Finally, as to php-dbase, that package has been deprecated. The functionality contained therein has been merged into php-common. Your php-dbase package should have been automatically removed, just as it was on my test systems. If it wasn't then there may be some larger issue with your server.

  21. Jesse says:


    I just upgraded to 7.93.29.EL-1.centos4. Was running 7.93.25.EL-1.centos4.

    It worked now...you might want to add that to a dependency list or something as that was a major issue.

    As for php-dbase...i noticed it was removed, but when i do a yum list | grep "php" it still shows up as 5.2.4-jason.1 which is why i was wondering. Didn't know it was being moved into php-common.

    Thank you very much for the debugging help in figuring out whats wrong.

  22. Jason says:


    I'll look into adding that dependency for the next version.

  23. mz says:

    mod_access is missing from it,
    original centos4 rpm-s include one

  24. Jason says:


    No it's not, mod_access does not exist under httpd 2.2.x. If you were using mod_access then you should switch to mod_authz_host.


  25. LaMonte says:

    Hi Jason,

    First of all, thanks for the work you've done here... All of your updates have worked very well for me except this one. I'm on a server with an Ensim control panel. I took a chance that these wouldn't cause me any grief, but as soon as I installed the 2.2.6 update everything stopped working. I was able to get things back working with a bit of backtracking, but now it seems that my /dev directory is still pretty messed up. Based on modification dates it would appear that part of this update changed things in the /dev directory and I need to get it back to original (Ensim is telling me it can't find certain files and such). What I had to do is remove the 2.2.6 update and reinstall what I had (2.2.3). What I need to know is what you'd recommend reinstalling (short of my entire Ensim application), to try to fix my /dev directory.

    Thanks again, keep up the great work...


  26. Henning says:

    Hi Jason,
    First of all thanks for the great work you are doing. we have tried to update our RHEL4 Installations with you apache 2.2 Packages and it seems, there is a dependency missing in one of the packages as we get:

    rpm -i --test http://www.jasonlitka.com/media/EL4/x86_64/apr-1.2.8-4.jason.1.x86_64.rpm
    rpm -i --test http://www.jasonlitka.com/media/EL4/x86_64/apr-util-1.2.8-4.jason.1.x86_64.rpm
    rpm -i --test http://www.jasonlitka.com/media/EL4/x86_64/httpd-2.2.6-jason.1.x86_64.rpm
    error: Failed dependencies:
    libsqlite3.so.0()(64bit) is needed by apr-util-1.2.8-4.jason.1.x86_64

    Which package neeeds to be installed to satisfy this dependency?

    We mostly need this update because of a bug in the mod_cache module.

    Thanks in advance,

  27. Jason says:


    I just checked again to make sure, but there is absolutely nothing in this package that would have touched your /dev folder.

    Did you install/update anything else at the same time? Were any packages removed?

    In any case, as long as udev is working and sysfs is automounted on boot, your /dev partition should automatically be rebuilt when the server is restarted.

  28. Jason says:


    That dependency only applies to users of RHEL4 (because 'yum' is not included with that distro) and is mentioned on the "Yum Repository" page. There is a link to the package you need.


  29. LaMonte says:


    There were a few things that were removed as dependencies when I removed this update that I thought I got reinstalled, but apparently I must have missed something. I've rebooted the system, the files are there, but Ensim is still telling me it can't find things (that appear to be there). I'll plow through it and see what else I can find out. I'm just curious what the 2.2.6 update did to cause Ensim and a whole bunch of other things to stop working... (Ensim doesn't like it when you mess around with things...).

    Thanks again.


  30. LaMonte says:


    Just an FYI, fortunately, before I did any updating I had done a YUM List so I could compare what was installed after the fact. I finally got around to do a comparison and found what had been deleted. When I installed the 2.2.6 and had to back-track a few files were deleted, I replaced them and things are fine... I hate being stupid... :-)


  31. Jason says:


    Unfortunately, I have never used Ensim, so I can't really be sure what went wrong for you. It's possible that they use a different packaging format for their copy of httpd and bundle some non-standard, but needed, files or that they have added additional packages which have dependencies specifically on httpd 2.2.3 (instead of "httpd-mmn = 20051115").

  32. Paul says:


    Great work, I had some custom rolled versions of 2.2.x running but switched over to yours. Your repo makes things just that much nicer.

    I was wondering, since you're packaging 2.2.x and PHP 5 with fcgi enabled any chance of packagaing up mod_fcgi?

  33. Jason says:


    I'll take a look. Just out of curiosity... What are you using it for? The native PHP module is faster under httpd.

  34. Paul says:


    I use Apache in worker mode so mod_php isn't an option, not threadsafe. Worker mode is a bit less memory intensive and just a better match I think if you're using Apache 2.2.x. Check out, http://lucumr.pocoo.org/cogitations/2007/09/30/pushing-apache-performance/

    I found that http://www.virtualmin.com/ has a src.rpm of mod_fcgi that compiled well against your packages.

  35. Jason says:


    I'll take a look at mod_fcgi.

    I've considered the worker mpm for some of my systems as well, but as I understand it, you still need to spawn external PHP processes, just as with lighttpd, so there really isn't much in the way of resource savings, it's just been shifted somewhere else, correct? The real benefit should be that the number of PHP processes does not need to equal the number of httpd processes (which would benefit sites that have a lot of static content).

  36. Paul says:


    True they've been shifted elsewhere, but like you pointed out if you have a lot of static content then you can have a lot more Apache processes without the added mod_php attached.

  37. Barry says:

    I have some more info on the pidof issue above, as something similar happened to me.

    I was getting the error message:
    pidof: invalid options on command line!

    The above notes were helpful in tracking thngs dowm here is what I got to work:

    During my upgrade of httpd and php, I guess a bug was introduced in /etc/rc.d/init.d/httpd

    In /etc/rc.d/init.d/httpd I needed to make this change in the killproc line

    10 second is required before SIGKILLing the
    < # httpd parent; this gives enough time for the httpd parent to SIGKILL any
    < # errant children.
    < # killproc -d 10 $httpd
    killproc $httpd

    Relevant packages I have installed:

    #yum list httpd initscripts php
    Loading "installonlyn" plugin
    Installed Packages
    httpd.x86_64 2.2.6-jason.2 installed
    initscripts.x86_64 8.31.6-1 installed
    php.x86_64 5.2.4-jason.2 installed

    One thing to note is this is actually a FC5 system, not CentOS.

    I have done the install successfully on a CentOS system without making this change. so maybe it is a FC5 specific bug?

    In any case, I hope this easy workaround works for people.

  38. Barry says:

    I forgot to note in my message just above that on the CentOS system, I have initscripts 7.93.29.EL-1.centos4

    ah the fun of cutting edge Fedora!

  39. Barry says:

    Just tried the same upgrade on another fc5 system -

    #yum install httpd-2.2.6-jason.2.x86_64
    Resolving Dependencies
    --> Populating transaction set with selected packages. Please wait.
    ---> Package httpd.x86_64 0:2.2.6-jason.2 set to be updated
    --> Running transaction check
    --> Processing Dependency: rtld(GNU_HASH) for package: httpd
    --> Finished Dependency Resolution
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package httpd


    the systme I mentioned above is a development machine, and apparently at some point I upgraded some stuff fromteh centosplus repository. I dont' recall the details, but ti probably involved an update to the LAMP stack, and probably brought in some other later rpms that this more vanilla machine doesn't have.

    Just don't want to mislead anyone that this RPM will work on a stock FC5 system, although the workaround above might help if anyone esle sees the pidof error.

  40. Jason says:


    "rtld(GNU_HASH)" is provided by glibc-2.5-12 on CentOS5. I would assume that a similar package provides that dep under FC5. That said, I do not use Fedora and as such do not test any of my packages under that distro.

  41. John says:

    I'm having a hard time getting this to run because mod_fcgid.so seems to be corrupt in this distro. It's expecting a signature of xxx but getting yyy. I tried just removing the .so, but it looks like it's pretty hard wired into httpd. How do other people work around this?

  42. John says:

    e.g. of what i'm seeing post update:
    httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax error on l
    ine 2 of /etc/httpd/conf.d/fcgid.conf: API module structure 'fcgid_module' in fi
    le /usr/lib/httpd/modules/mod_fcgid.so is garbled - expected signature 41503232
    but saw 41503230 - perhaps this is not an Apache module DSO, or was compiled for
    a different Apache version?

  43. Jason says:


    httpd modules have version-specific dependencies on httpd. If you upgrade httpd without upgrading all of your modules then you'll get messages like that one. What package supplied that module?

  44. Andy says:

    Thanks for the nice repo jason.
    Ive used it before without issues but I made the mistake of Yum Updating major applications directly on the production web server and I got hit with no sites working after the upgrade!Aaagh

    I read up on this thread and corrected the mod_access issues in my httpd.conf.
    and killed all the httpd instances but it would still not allow me to restart httpd :( (see versions below)

    ok, I thought, I will reboot. So I downed the server (remote access as it is hosted dedicated) and when it came up the httpd instances were gone and it allowed me to start httpd (service httpd start) and mysqld and all seemed to be super!!

    But, all is not well still. The server is relatively fresh from a vanilla install and was in very good health so I know its not a previous issue.

    rpm -qa | grep centos


    Anyway, when I grepped it it didnt show apache in the list above which I thought was weird (cant recall if it should or not?). but the worst part is I tried to restart httpd as a test and it gave me this

    Stopping httpd: pidof: invalid options on command line!

    pidof: invalid options on command line!

    I investigated further and there is about 10 httpd processes running..which would be ok normally except this was the early hours of the morning (4am) and when I killed one process, it seemed another came back!
    I dont think this was users...and am not sure whats going on to be totally honest!

    Any suggestions on what may be the cause?

    Thanks a lot


  45. Jason says:


    You are running CentOS 4.2. The files in my repo are tested to work with the newest release of EL 4 & 5 when they are built. I would suggest that you run a "yum update" on your system to bring you up to 4.5 and, more importantly, bring your "initscripts" package up to "7.93.29.EL-1.centos4", that should fix the issue.

  46. Andy says:

    Thanks for the reply Jason :)

    Thats done the trick so thanks for persuading me into it!! Im usually a bit reluctant to do kernel updates from past experiences trying to compile custom kernels.
    but Yum really is a magic bit of kit (when it doesnt give dependencies errors!).
    Anyway, here is the latest versions after doing that...
    But I am only on centos-release-4-4.3... and not 4.5?

    Am I missing something here!!! (like a repo!)

    [[email protected] ~]# rpm -qa | grep centos

    Thanks and please keep up the great work. We REALLY do appreciate it

  47. John says:

    I see http://www.jasonlitka.com/media/EL4/i386/php-5.2.5-jason.1.i386.rpm sitting in the repository. However, yum update, yum upgrade, yum install, etc. does nothing. ?

  48. Jason says:


    Does running "yum update" again update more packages? If not I wouldn't worry about it.


    Those packages were copied into the directory yesterday but I did not rebuild the repo until a few minutes ago. If you run a "yum update" now then you should get PHP 5.2.5.

  49. Andy says:

    Thanks Jason.. Yum is fully updated though the max I get is Centos 4-4.3 as at the upgrade date.
    It has been working flawlessly since the initial upgrade so thanks for your continued hard work and excellent 'Yummidge' :)

  50. James says:

    Hey Jason, thanks for the great Repository, I think it is the best YUM repository out there :)

    But I have a question regarding the MPM Worker.

    I have a quad core and really want to take advantage of the multi-processor I have by utilizing the mpm-worker module in apache.

    I was wondering if you knew how I can be able to get MPM Worker working? Also, I hear that MPM Worker needs to be run in cgi mode or fcgi so I'm wondering, would you be able to release an fcgi yum package anytime soon?

    Thanks for your work, it is truly a blessing.


Check out what others are saying about this post...

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.