Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bluefuton/703313 to your computer and use it in GitHub Desktop.
Save bluefuton/703313 to your computer and use it in GitHub Desktop.
Automagic virtual hosts with mod_vhost_alias
NameVirtualHost *:80
<VirtualHost *:80>
VirtualDocumentRoot "/Users/my.name/sandbox/%1"
</VirtualHost>
@bluefuton
Copy link
Author

Pop this into your extra/httpd-vhosts.conf file. You can then use whatever-you-like.local which will automagically use /Users/my.name/sandbox/whatever-you-like as the webroot. You'll still need to add whatever-you-like.local to your hosts file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment