Skip to content

Instantly share code, notes, and snippets.

@santouras
Created May 25, 2012 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save santouras/2785150 to your computer and use it in GitHub Desktop.
Save santouras/2785150 to your computer and use it in GitHub Desktop.
httpd conf for wildcard dev virtualhosts
<Virtualhost *:80>
VirtualDocumentRoot "/var/www/%1/public"
ServerName vhosts.dev
ServerAlias *.dev
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
ErrorLog ${APACHE_LOG_DIR}/vhosts-error_log
SetEnv APPLICATION_ENV "development"
<Directory "/var/www/*">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</Virtualhost>
@iancoleman
Copy link

need to enable vhost_alias in /etc/apache2/mods-available/vhost-alias

$ sudo a2enmod vhost_alias

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