File: //etc/apache2/sites-enabled/mentalhealthsteps.com-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName mentalhealthsteps.com
ServerAlias www.mentalhealthsteps.com
DocumentRoot /var/www/mentalhealthsteps.com
<Directory /var/www/mentalhealthsteps.com>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/mentalhealthsteps.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mentalhealthsteps.com/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:80>
ServerName mentalhealthsteps.com
ServerAlias www.mentalhealthsteps.com
DocumentRoot /var/www/mentalhealthsteps.com
<Directory /var/www/mentalhealthsteps.com>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.
# RewriteCond %{SERVER_NAME} =www.mentalhealthsteps.com [OR]
# RewriteCond %{SERVER_NAME} =mentalhealthsteps.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
</IfModule>