Skip to content

Instantly share code, notes, and snippets.

@joelambert
Created October 23, 2013 08:49
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 joelambert/7114951 to your computer and use it in GitHub Desktop.
Save joelambert/7114951 to your computer and use it in GitHub Desktop.
Mac vhost setup: /etc/apache2/extra/httpd-vhosts.conf
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation jat
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
UseCanonicalName Off
# this log format can be split per-virtual-host based on the first field
#LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
#CustomLog logs/access_log vcommon
# include the server name in the filenames used to satisfy requests
VirtualDocumentRoot /Users/{username}/Sites/%0/web
VirtualScriptAlias /Users/{username}/Sites/%0/cgi-bin
<Directory "/Users/{username}/Sites/*/web">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
<Directory "/Users/{username}/Sites/*/web/*">
AllowOverride All
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment