Last active
April 21, 2020 04:48
-
-
Save aslamanver/b2a9b77a7137ff074f7a340ec917bf9e to your computer and use it in GitHub Desktop.
Generate Wildcard SSL certificate using Let's Encrypt - Certbot CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install SSL Wildcard Certificate | |
sudo certbot certonly --manual --preferred-challenges=dns --email [email protected] --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.mydomain.com | |
# SSL Vulnerability Testing | |
docker run --rm -ti drwetter/testssl.sh -U mydomain.com | |
# Online testing tool | |
# https://www.ssllabs.com/ssltest/analyze.html?d=mydomain.com&latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:443> | |
ServerAdmin [email protected] | |
ServerName mydomain.com | |
DocumentRoot /var/www/mydomain.com | |
SSLEngine On | |
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;" | |
SSLProtocol +TLSv1.2 | |
SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-G$ | |
SSLHonorCipherOrder on | |
SSLCompression off | |
SSLOptions +StrictRequire | |
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> | |
<VirtualHost *:80> | |
SSLEngine off | |
Redirect permanent / https://mydomain.com/ | |
ServerAdmin [email protected] | |
ServerName mydomain.com | |
DocumentRoot /var/www/mydomain.com | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment