Skip to content

Instantly share code, notes, and snippets.

@lcdsantos
Last active August 7, 2017 23:48
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 lcdsantos/17c620f4cda30821ffe3812e257f8e75 to your computer and use it in GitHub Desktop.
Save lcdsantos/17c620f4cda30821ffe3812e257f8e75 to your computer and use it in GitHub Desktop.
Apache Wildcard VHOST
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#
# Enable vhost_alias_module
<VirtualHost *:80>
UseCanonicalName Off
ServerAlias *.dev.com
VirtualDocumentRoot "D:\Sites\%1\public_html"
<Directory "D:\Sites\*\public_html">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment