-
-
Save erivello/5355147 to your computer and use it in GitHub Desktop.
My dynamic (*.dev) vhost configuration and BIND configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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