Tag Archives: httpd

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: