Skip to content

Instantly share code, notes, and snippets.

@ZermattChris
Created October 21, 2013 18:28
Show Gist options
  • Save ZermattChris/7088577 to your computer and use it in GitHub Desktop.
Save ZermattChris/7088577 to your computer and use it in GitHub Desktop.
Part of the vhost.sh script. Copy to /etc/apache2/sites-available
<VirtualHost *:80>
ServerAdmin webmaster@your-project.com
DocumentRoot /var/www/template.projectname/public_html
ServerName template.url
ErrorLog "/var/www/template.projectname/logs/error.log"
CustomLog "/var/www/template.projectname/logs/access.log" common
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
# A self-signed (snakeoil) certificate can be created by installing
# the ssl-cert package. See
# /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
DocumentRoot /var/www/template.projectname/public_html
ServerName template.url
ErrorLog "/var/www/template.projectname/logs/error.log"
CustomLog "/var/www/template.projectname/logs/access.log" common
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment