Skip to content

Instantly share code, notes, and snippets.

@lutangar
Last active August 29, 2015 14:03
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 lutangar/6eff211debe25f59e628 to your computer and use it in GitHub Desktop.
Save lutangar/6eff211debe25f59e628 to your computer and use it in GitHub Desktop.
Sample Vhost configuration example for apache2.4 (with itk to host under your home, or without to host under /var/www)
<VirtualHost *:80>
ServerName example.io
ServerAlias my.example.io
ServerAlias example.com
DocumentRoot "/home/myuser/workspace/example.io"
# Directory
<Directory /home/myuser/workspace/example.io>
Require all granted
AllowOverride All
</Directory>
<IfModule mpm_itk_module>
AssignUserId myuser www-data
</IfModule>
# Logging
ErrorLog ${APACHE_LOG_DIR}/example-error.log
CustomLog ${APACHE_LOG_DIR}/example-access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName example.io
ServerAlias my.example.io
ServerAlias example.com
DocumentRoot "/var/www/example.io"
# Directory
<Directory /var/www/example.io>
Require all granted
AllowOverride All
</Directory>
# Logging
ErrorLog ${APACHE_LOG_DIR}/example-error.log
CustomLog ${APACHE_LOG_DIR}/example-access.log combined
</VirtualHost>
@lutangar
Copy link
Author

lutangar commented Jul 1, 2014

To track all the logs of your site :

tail -f /var/log/apache2/example-*.log

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