jrobinsonc
9/21/2016 - 9:42 PM

apache vhosts

apache vhosts

<Directory "/var/www">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
</Directory>

<VirtualHost *:80>
    DocumentRoot "/var/www/html"
    ServerName localhost
    ServerAlias 127.0.0.1
</VirtualHost>

# Domains for projects
# "/var/www/mysite" => http://mysite.dev
# Edit the "/etc/hosts" file adding "127.0.0.1 mysite.dev"
<VirtualHost *:80>
    UseCanonicalName Off
    ServerName vhosts.fqdn
    ServerAlias *.dev
    VirtualDocumentRoot "/var/www/%-2+"
    # http://httpd.apache.org/docs/2.4/mod/mod_vhost_alias.html
</VirtualHost>