Skip to content

Instantly share code, notes, and snippets.

@drewgates
Created February 25, 2017 19:37
Show Gist options
  • Save drewgates/0ce7e2df4cd31709d5ea350555286ad3 to your computer and use it in GitHub Desktop.
Save drewgates/0ce7e2df4cd31709d5ea350555286ad3 to your computer and use it in GitHub Desktop.
apache vhost config example
<VirtualHost *:80>
ServerName drew.ga
ServerAdmin webmaster@localhost
DocumentRoot /var/www/drew.ga
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName drew.ga
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/drew.ga/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/drew.ga/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/drew.ga/chain.pem
ServerAdmin webmaster@localhost
DocumentRoot /var/www/drew.ga
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/drew.ga>
AllowOverride All
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment