Skip to content

Instantly share code, notes, and snippets.

@gchumillas
Last active May 6, 2018 14:20
Show Gist options
  • Save gchumillas/b70e6876d9ce40d617d31722279858cc to your computer and use it in GitHub Desktop.
Save gchumillas/b70e6876d9ce40d617d31722279858cc to your computer and use it in GitHub Desktop.
Apache2, Virtual Host
## File:
# /etc/apache2/sites-available/myproject.localhost.conf
## Enables a virtual host
# a2ensite myproject.localhost.conf
## Disables a virtual host
# a2dissite myproject.localhost.conf
## reloads Apache2
# service apache2 reload
<VirtualHost *:80>
ServerName myproject.localhost
# the website "lives" in www/
DocumentRoot /path/to/myproject/www
# logs files
ErrorLog /path/to/myproject/logs/error.log
CustomLog /path/to/myproject/logs/access.log combined
<Directory /path/to/myproject/www>
Options Indexes FollowSymLinks MultiViews
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