File: //etc/apache2/sites-enabled/teenthreads.com.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName teenthreads.com
ServerAlias www.teenthreads.com
DocumentRoot /var/www/teenthreads.com
<Directory /var/www/teenthreads.com>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/teenthreads_error.log
CustomLog ${APACHE_LOG_DIR}/teenthreads_access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.teenthreads.com [OR]
RewriteCond %{SERVER_NAME} =teenthreads.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>