How do I install an older version of Apache httpd in CentOS 6 using YUM

Simply:

yum downgrade httpd-<version-number>

The version must be available already in the repository, which you can verify with:

yum list --showduplicates httpd

You might then encounter dependency problems: an older version of httpd depends on an older package that has been obsoleted. In that case, you must remove the depending packages.

If the version you are looking for isn't available in the repo, and you can't find the RPM using rpmbone search, build from source.


Why do you want that exact version, and not the CentOS version based on 2.2.15 (presumably with backports for bugfixes up to 2.2.(last) and then some)?

CentOS is basically recompiled RHEL sources, and as an enterprisey distribution they stay with the base version from the original release of the distribution (itself carefully selected), backporting relevant bugixes, in order to be able to guarantee backward compatibility. Only if the above turns out impossible do they introduce new versions.