My ISP has upgraded the server to Apache 2.4.9 from 2.2.xx. It has broken a couple things in my setup and I want to bring my local copy of Apache 2.2.26 to 2.4.9 so that I can test locally.
I've been trying to find some information online, but I can’t seem to find a step by step instructions on how to do it, and mostly I find recommendations of NOT doing it. Instead I find people suggesting Homebrew, MacPorts, or Fink.
Given that I have a number of sites working with local.xxxx.com and it all works well (edit locally, test by visiting their corresponding url with the local. prefix) and it is all pretty convenient and nice, I would like to continue doing the same, but with Apache 2.4.9. Any advice as to what's the best way to do this, or a pointer to instructions would be greatly appreciated.
Best Answer
If you succeed, you will break part of the System
You don't want to do that. Apache2 is part of the OS. If you somehow achieve what you are after, you will break any ability to upgrade Apache2 or have any security updates Apple roles out that is applied using the built-in Mac App Store or softwareupdate from Apple. You should leave it be and install a different Apache2. Also, that way you will be assured that subsequent Apple updates also do not break your upgraded version of Apache2, which is just as likely (if not inevitable).
MacPorts
MacPorts is a robust, stable, mature and easy to use package management solution, for OS X. It is modeled after FreeBSD's ports system, which has been adopted as the basis of NetBSD's pkgsrc. I highly recommend MacPorts.
install Xcode 5.1.1
MacPorts requires an appropriate version of xcode; xcode_5.1.1.dmg is the most recent version for Mavericks (after registerring for a free developer account, and logging into developer.apple.com, that link will begin your xcode download). Once the download completes:
Install MacPorts
Get to know MacPorts
add MacPorts to your $PATH:
install Apache 2.4.9
That's really all there is to it. If you can configure httpd.conf, you can do this too. And you can keep it updated to the nosebleeding edge simply with:
MacPorts will not interfere with the use of OS X internal Apache2 server, nor with any other software. It keeps everything it installs in its /opt directory.
If for whatever reason you are unsatisfied and/or need to remove MacPorts:
to completely uninstall MacPorts