Skip to content

Instantly share code, notes, and snippets.

@erivello
Forked from stefanosala/gist:3881637
Last active December 16, 2015 01:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erivello/5355147 to your computer and use it in GitHub Desktop.
Save erivello/5355147 to your computer and use it in GitHub Desktop.
My dynamic (*.dev) vhost configuration and BIND configuration
$TTL 60
$ORIGIN dev.
@ 1D IN SOA localhost. root.localhost. (
45 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS localhost.
1D IN A 127.0.0.1
*.dev. 60 IN A 127.0.0.1
<VirtualHost *:80>
ServerName dev
ServerAlias *.dev
DocumentRoot /Users/erivello/Sites
<Directory /Users/erivello/Sites>
AllowOverride All
Allow from All
</Directory>
SetEnv LocalDev true
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev
RewriteCond /Users/erivello/Sites/%1.dev/web -d
RewriteRule ^(.*) /%1.dev/web/$1 [L]
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.dev
RewriteCond /Users/erivello/Sites/%1.dev -d
RewriteRule ^(.*) /%1.dev/$1 [L]
<Location />
SetInputFilter DEFLATE
</Location>
</VirtualHost>
...
zone "dev" IN {
type master;
file "dev.zone";
allow-update { none; };
};
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment