Skip to content

Instantly share code, notes, and snippets.

@silviopaganini
Created August 15, 2015 17:09
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 silviopaganini/d1b8ef55d4ae71861383 to your computer and use it in GitHub Desktop.
Save silviopaganini/d1b8ef55d4ae71861383 to your computer and use it in GitHub Desktop.
Vhost wild card
UseCanonicalName Off
LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
VirtualDocumentRoot /var/www/html/%0
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
<Directory /var/www/html/%0>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment