Skip to content

Instantly share code, notes, and snippets.

@ejhayes
Created June 12, 2011 07:52
Show Gist options
  • Save ejhayes/1021331 to your computer and use it in GitHub Desktop.
Save ejhayes/1021331 to your computer and use it in GitHub Desktop.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
# my development sites
127.0.0.1 app1.local
# Include at the bottom of this file
Include /usr/local/etc/sites/*.conf
# we will be listening on port 80 already so no need to tell apache to listen on port 80
# otherwise, we would specify it using the listen parameter
#Listen 80
# we will be using several different named addresses pointing to this ip
# so we need to let apache know about that
NameVirtualHost 127.0.0.1
# by default apache is super restrictive, so you need to allow access to the directories
# before apache will server things up. if not, you'll get a permission denied error
<Directory /Users/USERNAME/Code>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# the virtual host ip address must match exactly to the NameVirtualHost specific above
<VirtualHost 127.0.0.1>
# files will be served from this location
DocumentRoot /Users/USERNAME/Code
# the requested server name was app1.local
ServerName app1.local
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment