Skip to content

Instantly share code, notes, and snippets.

@chrisroos chrisroos/

Created Apr 17, 2015
What would you like to do?
Configuring Apache, Passenger and Dnsmasq of Mac OS X

Configure Dnsmasq to respond to *.dev

Assuming it's been installed using Homebrew.

Add the following to dnsmasq.conf (/usr/local/etc/dnsmasq.conf).


Stop and start the service:

sudo launchctl stop homebrew.mxcl.dnsmasq
sudo launchctl start homebrew.mxcl.dnsmasq

Add a resolver

Create /etc/resolver/dev and add the following line:


Add Apache Virtual Host

This assumes Passenger is already installed.

<VirtualHost *:80>

  PassengerRuby /Users/chrisroos/.rbenv/versions/2.1.5/bin/ruby
  RackEnv development

  DocumentRoot "/Users/chrisroos/Code/freerange/site"
  <Directory "/Users/chrisroos/Code/freerange/site">
    Allow from all
    Options -MultiViews
    Require all granted

  ErrorLog "/Users/chrisroos/Code/freerange/site/log/apache-error.log"
  CustomLog "/Users/chrisroos/Code/freerange/site/log/apache-access.log" common

Restart Apache

sudo apachectl graceful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.