Skip to content

Instantly share code, notes, and snippets.

@michaelbunch
Last active August 29, 2015 13:56
Show Gist options
  • Save michaelbunch/56308cb3c02a0d0f9625 to your computer and use it in GitHub Desktop.
Save michaelbunch/56308cb3c02a0d0f9625 to your computer and use it in GitHub Desktop.
Apache 2.4 Virtual Host Example
<VirtualHost sitename.dev:80>
DocumentRoot /var/www/sitename.dev
ServerName <sitename.dev>
ServerAdmin <[email protected]>
ErrorLog /var/logs/apache2/sitename.dev-error_log
<Directory "/var/www/sitename.dev">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
@michaelbunch
Copy link
Author

To make this work with Apache 2.2, remove the line Require all granted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment