Home Server Apache Solution to: How do I re-install mod_wsgi on Mac after upgrading to...

Get social!

Let me preclude this post with saying that I had mod_wsgi working alongside Apache on my Mac 10.8 quite happily for some time. However, after upgrading to 10.9 (OSX Mavericks), my mod_wsgi.so file disappeared from my computer. Also, my httpd.conf file was overwritten as well (the upgrade was nice enough to save a copy before doing so).

I say all this so you know that there are probably more steps to adding the mod_wsgi module from scratch. I did so a long time ago so I don’t remember exactly what they were.

Using Homebrew

If you are unfamiliar with Homebrew, read about it here:


My first attempt was to use Homebrew to install mod_wsgi, then possibly copy the module to the Apache modules folder.

No good. I received this error:

“Make”-ing Manually

Next, I tried copying the mod_wsgi folder that Brew downloaded to /tmp…

…then making manually:


This problem was easily resolved by following the advice here (first answer on page, substitute “9” for “9” in OS version):


Of course, after fixing that issue I wound up looking at the same (first) error message above about missing httpd.h. Looks like I need some Apache source (ugh). Or maybe not. The file exists here:

So a search through mod_wsgi.c (v. 3.3) finds this statement at line 34:

Changed it to:

Then tried “make” again:

Same error. Hey, the compiler uses this include dir:

But it doesn’t exist. Maybe if I link it to the apache2 folder under the SDK folder above:

Now I get:

I’m on a roll now!

Then “make” again:

Argh! This could go on forever. Time to take out the sledgehammer.

Note: If you are the conservative type that doesn’t like to blow up your computer from time to time, the next command *might* not be something you’re into doing.

Hoorah! Got some .so files! Wait, no I don’t! I have .lo, .o, and .slo files. WTF?!

That was it!

OK, let’s see if she works…


Django admin interface

That’s my Django app admin interface above. I missed her!



Leave a Reply

Bad Behavior has blocked 34 access attempts in the last 7 days.