Created
October 1, 2019 00:57
-
-
Save DilwoarH/98a28d904f48e325bfbe9fdfad1660f7 to your computer and use it in GitHub Desktop.
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
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerAdmin webmaster@edusensys.com | |
Redirect 301 / https://www.example.com | |
DocumentRoot /var/www/example.com | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] | |
RewriteRule ^/(.*) https://www.example.com/$1 [L,R] | |
ErrorLog ${APACHE_LOG_DIR}/example-com-ssl-error.log | |
CustomLog ${APACHE_LOG_DIR}/example-com-ssl-access.log combined | |
SSLEngine on | |
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/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