Skip to content

Instantly share code, notes, and snippets.

@ckhung
Last active May 12, 2019 07:15
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 ckhung/24a8fcf4a50892da23f9e680ff39776d to your computer and use it in GitHub Desktop.
Save ckhung/24a8fcf4a50892da23f9e680ff39776d to your computer and use it in GitHub Desktop.
apache2 config to enable wildcard ssl certificate
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin 貴哥的電子郵件信箱
DocumentRoot /var/www/html/abc
ServerName abcdef.frdm.info
ErrorLog ${APACHE_LOG_DIR}/abcdef/error.log
CustomLog ${APACHE_LOG_DIR}/abcdef/access.log combined
Header set Access-Control-Allow-Origin "*"
SSLCertificateFile /etc/letsencrypt/live/frdm.info/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/frdm.info/privkey.pem
</VirtualHost>
<VirtualHost *:443>
ServerAdmin 貴哥的電子郵件信箱
DocumentRoot /var/www/html/uvwxyz
ServerName uvwxyz.frdm.info
ErrorLog ${APACHE_LOG_DIR}/uvwxyz/error.log
CustomLog ${APACHE_LOG_DIR}/uvwxyz/access.log combined
Header set Access-Control-Allow-Origin "*"
SSLCertificateFile /etc/letsencrypt/live/frdm.info/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/frdm.info/privkey.pem
</VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment