Forked from ofus/vhost-wildcard-subdomain.conf
Last active
September 20, 2015 19:09
-
-
Save andrewgribben/af75f8f95fdeee8c73df to your computer and use it in GitHub Desktop.
Apache Virtual Hosts with wildcard subdomain matching
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
UseCanonicalName Off | |
<VirtualHost *:80> | |
ServerAdmin nobody@example.com | |
ServerAlias *.example.com | |
VirtualDocumentRoot /var/www/%1/public | |
DirectoryIndex index.php index.htm index.html | |
<Directory /var/www/*/public/> | |
AllowOverride All | |
</Directory> | |
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
CustomLog /var/log/apache2/vhosts-access.log vcommon | |
ErrorLog /var/log/apache2/vhosts-error.log | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment