<VirtualHost *:80>
    ServerName offstream.ddns.net
    Redirect permanent / https://offstream.ddns.net/
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName offstream.ddns.net
    DocumentRoot /var/www/offstream

    ErrorLog ${APACHE_LOG_DIR}/offstream-error.log
    CustomLog ${APACHE_LOG_DIR}/offstream-access.log combined

    <Directory /var/www/offstream>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/offstream.ddns.net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/offstream.ddns.net/privkey.pem
</VirtualHost>
</IfModule>
