Skip to content

Instantly share code, notes, and snippets.

@tuupola
Created August 19, 2010 14:17
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 tuupola/537986 to your computer and use it in GitHub Desktop.
Save tuupola/537986 to your computer and use it in GitHub Desktop.
Automated dev.* subdomains for Apache.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
VirtualDocumentRoot "/Users/tuupola/Code/www/%0/htdocs"
ServerName dev.subdomains
ServerAlias dev.*
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
ErrorLog "/Users/tuupola/Code/www/logs/vhosts-error_log"
CustomLog "/Users/tuupola/Code/www/logs/vhosts-access_log" vcommon
</VirtualHost>
function FindProxyForURL(url, host) {
if (shExpMatch(host, "dev.*")) {
return "PROXY localhost";
}
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment