Skip to content

Instantly share code, notes, and snippets.

@nickfloyd
Created February 5, 2011 04:01
Show Gist options
  • Save nickfloyd/812186 to your computer and use it in GitHub Desktop.
Save nickfloyd/812186 to your computer and use it in GitHub Desktop.
When passenger prefpane stops working and you have to add a host manually in OSX 10.6.x
#create a passenger host config file
touch /etc/apache2/passenger_pane_vhosts/[site].local.vhost.conf
#contents ++++++++++++++++++
<VirtualHost *:80>
ServerName site.local
DocumentRoot "/Users/nfloyd/code/rails/site/public"
RackEnv development
<Directory "/Users/nfloyd/code/rails/site/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#contents ++++++++++++++++++
# add host to local host database
sudo dscl localhost -create /Local/Default/Hosts/site.local IPAddress 127.0.0.1
#flush dns
sudo dscacheutil -flushcache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment