Skip to content

Instantly share code, notes, and snippets.

@bkozora
Created October 8, 2015 21:00
Show Gist options
  • Save bkozora/6d7a1d17de62bec0557d to your computer and use it in GitHub Desktop.
Save bkozora/6d7a1d17de62bec0557d to your computer and use it in GitHub Desktop.
Apache - Wildcard Subdomains
DocumentRoot "/var/www/vhosts"
<Directory "/var/www/vhosts">
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
#Require all granted
</Directory>
<VirtualHost *:80>
VirtualDocumentRoot /var/www/vhosts/%1/www/
ServerAlias *.exampledomain.com
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment