<IfModule mod_ssl.c>

<VirtualHost *:80>
    ServerName  interact.ugent.be
    Redirect permanent / https://interact.ugent.be/

    RewriteEngine on
    RewriteCond %{SERVER_NAME} =interact.ugent.be
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
    ServerName  interact.ugent.be
    DocumentRoot /shares/webapps/interact/_site

    ErrorLog    ${APACHE_LOG_DIR}/interact_error.log
    CustomLog   ${APACHE_LOG_DIR}/interact_access.log combined

    <Directory "/shares/webapps/interact/_site">
	AllowOverride All
        Require all granted
        Options +Indexes        
    </Directory>

    SSLCertificateFile /etc/letsencrypt/live/interact.ugent.be/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/interact.ugent.be/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

</IfModule>
