File: //etc/apache2/sites-available/ib-igb.agighana.org.conf
<VirtualHost *:80>
ServerAdmin webmaster@agighana.org
ServerName ib-igb.agighana.org
DocumentRoot /var/www/html/ib-igb
<Directory /var/www/html/ib-igb>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/ib_igb_error.log
CustomLog ${APACHE_LOG_DIR}/ib_igb_access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =ib-igb.agighana.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@agighana.org
ServerName ib-igb.agighana.org
DocumentRoot /var/www/html/ib-igb
<Directory /var/www/html/ib-igb>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
SSLEngine on
ErrorLog ${APACHE_LOG_DIR}/ib_igb_ssl_error.log
CustomLog ${APACHE_LOG_DIR}/ib_igb_ssl_access.log combined
SSLCertificateFile /etc/letsencrypt/live/ib-igb.agighana.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ib-igb.agighana.org/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>