Configuring Apache Wildcard Virtualhost on OS X 10.11 El Capitan


This is the second part of a series on BAMP. In this part we will configure Apache using a wildcard virtual host and explore virtual document root. This tutorial was made using OS X 10.11.3 El Capitan with Apache 2.4. My text editor of choice is TextMate and it’s command line utility is mate. So when you see that command, substitute the text editor of your preference.

Read More »

A Smarter MAMP Redux…


A number of years back I was introduced to BIND by an article titled A Smarter MAMP. In the following tutorials I’ll try and pay the favor forward to those who have yet to discover the awesomeness of running a local DNS server on top of a typical AMP (Apache MySQL PHP) stack. BIND isn’t the only option. If you want a DNS server with little to no configuration then DNSMasq is the better option for you.


BIND | Apache | MySQL | PHP


Lets take a minute to talk about how we will eventually install the stack in reverse order.

PHP is installed on OS X by default, So we only need to load it’s module in our Apache config file.

MySQL is readily available from; but I like to install it via Homebrew.

Apache is installed with OS X as well. It just needs a little configuration and to be loaded on boot.

BIND can also be installed via Homebrew

You’re probably familiar with the AMP part but what about the “B”. What can BIND do that you can’t do with out it? Let’s review the old way of doing things versus the new way with BIND.

Read More »

Xcode breaks ability to compile Apache modules.

Recently when trying to install a mod_bonjour module for Apache I encountered the following error:

/Applications/ No such file or directory

It appeared that Xcode was missing a symbolic link. Here’s how to resolve the error:

sudo ln -s XcodeDefault.xctoolchain OSX10.11.xctoolchain

Compiling Mod_Bonjour on OS X 10.11 El Capitan


Remember the good old days when  OS X ‘s Apache came with mod_bonjour and user sites were broadcast automagically. It can be a useful feature especially in a multiuser or lab setting. Well never fear, you can activate it once again. All you need to do is compile and install mod_bonjour for Apache on El Capitan.

What can mod_bonjour do? It can automate three types of tasks over your LAN:

  1. Broadcast a link to a default website for your computer.
    • http://computername.local.
  2. Broadcast links to other webpages which will be seen as paths of the default web address.
    • http://computername.local./resource1
    • http://computername.local./resource2
  3. Broadcast a link to a website for each individual user account on your computer .
    • http://computername.local./~username
    • http://computername.local./~anotherusername

All of which require zero configuration once the Apache module has been compiled, loaded, and a few directives set. Pretty nifty huh? So let’s get to it. Read More »

How to work with System Integrity Protection in El Capitan


OS X 10.11 El Capitan introduced a security feature called System Integrity Protection or SIP. It flags certain system directories and files as “Restricted” and they cannot be altered not even using the root account.

Directories that are jailed by SIP
/bin /sbin /usr /System
Directories that allow root access for developers
/usr/local /Applications /Library ~/Library

For better or worse, SIP is a good thing. It not only protects you from malicious intent but it can also protect you from yourself, insuring that only Apple signed software can alter certain system files. And it makes you think twice before meddling where you probably shouldn’t.

That being said there are occasions when you might need access to those system files. Compiling and installing Apache modules for example. Let’s find out how to work with SIP. Read on…

Installing Xcode

If you’re gonna develop on a mac you’ll want to get started by downloading and installing Apple’s developer app Xcode. This will allow you to install nifty command line tools like ruby and git among others. So go ahead and download Xcode via

Once you’ve installed Xcode, you can install the line tools by opening Terminal and entering:

xcode-select --install

You’ll need to launch Xcode from the Finder or Terminal and agree to Apple’s terms of service to complete the process and finalize the installation.

open /Applications/

That’s all there is to it.

OS X Finder Visibility

There are times when navigating the filesystem of a Mac that the Finder comes in handy. Like being able to drag and drop files and folders into Terminal and have the path automagically appear instead to having to type the whole thing. Unfortunately by default, much of the OS is hidden but there are ways way to see it.

You can always use the Finder’s “Go” menubar item to “go to folder” (keystroke: Cmd+Shift+G) to access hidden directories. That can get tedious if you’re repetitively accessing hidden folders. So how do we make the invisibles visible?
Read on to find out how.