Compiling Apache HTTPD on Mac (Tech Tip #45)

One of my blogs needed Apache HTTPD 2.4.x on Mac but quickly realized that the binaries are available only for Netware and Win32. Even the build instructions were only for RPM-based systems. So I downloaded the source code and started building it.

Complete compile instructions are explained here. However there were some issues on Mavericks and so decided to document it.

Let’s go!

  1. Download the source bundle and unzip:
  2. Source code comes with INSTALL instructions and per that the following should’ve worked:
    So gave the command
    and got the first error:
  3. Moved past “checking whether the C compiler works… no” error by following instructions on stackoverflow #13587001.In short, do the following for Mavericks
  4. Issued the command to compile the server again and got the error as shown:
    This was resolved using stackoverflow #10663180. In short:

    1. Download PCRE as:
    2. Compile and install as:

    The compilation output is shown here.

  5. Compile HTTPD source again as:

    Complete output of this configuration is here.

  6. Now issue the command make:

    Complete output of the command is shown here.

  7. Finally install Apache2 as:

    Complete output of this command is shown here.

Version for HTTPD can be checked as:

Server can be started as:

Stopped as:

Restarted as:

Enjoy!

Be Sociable, Share!
  • Tweet

7 thoughts on “Compiling Apache HTTPD on Mac (Tech Tip #45)

  1. I’m certainly lazier than you. When I need httpd 2.4, I’m downloading XAMMP. It’s easy to install. The drawback is the size (120 MB to download), as it includes MySQL and PHP.

  2. These are іn fact great ideas in regarding blogging. You havе touched some nicе factors here.

    Any way keep up wrinting.

    Visit mƴ weƅsite weight loss tactics (Reva)

  3. Thanks for the pointer to the SO article–it got me around the “checking whether the C compiler works… no” error.

  4. Hi Arun,
    Thanks for the article, instructions worked great, I could build Apache on Mac OSX (10.11 El Capitan) successfully.

    Also want to appreciate your contribution to the Java community!

    Regards
    Prash

  5. Thanks for the help man.

    I was stuck on this for Hours!

    You’re a lifesaver!

  6. There are more different way to find get help in windows 10 get help in windows 10 now look it here and following this way step by step.

Leave a Reply

Your email address will not be published. Required fields are marked *