Skip to content

Instantly share code, notes, and snippets.

@saetia
Created December 8, 2011 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saetia/1447655 to your computer and use it in GitHub Desktop.
Save saetia/1447655 to your computer and use it in GitHub Desktop.
Virtual Hosts, Dnsmasq
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew install dnsmasq
mate /usr/local/etc/dnsmasq.conf
address=/dev/127.0.0.1
address=/build/127.0.0.1
address=/stage/192.168.10.200
listen-address=127.0.0.1
sudo cp /usr/local/Cellar/dnsmasq/2.57/uk.org.thekelleys.dnsmasq.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
mate /etc/apache2/users/Joel.conf
DocumentRoot "/Users/Joel/Sites/"
NameVirtualHost *:80
<Directory "/Users/Joel/Sites/">
Options Indexes MultiViews FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
UseCanonicalName off
VirtualDocumentRoot /Users/Joel/Sites/%-2+/httpdocs
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment