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

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName stream.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/stream.ddns.net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/stream.ddns.net/privkey.pem
</VirtualHost>
</IfModule>
