<VirtualHost *:443>
  ServerName {{DOMAIN}}
  ServerAlias {{DOMAIN}}

  DocumentRoot {{WEB_ROOT}}/{{FOLDER}}/
  ErrorLog ${APACHE_LOG_DIR}/{{DOMAIN}}-error.log
  CustomLog ${APACHE_LOG_DIR}/{{DOMAIN}}-access.log combined

  <Directory "{{WEB_ROOT}}/{{FOLDER}}/">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

  SSLEngine On

  # Other Apache Configuration

  Include /etc/letsencrypt/options-ssl-apache.conf

  SSLCertificateFile /etc/letsencrypt/live/{{DOMAIN}}/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/{{DOMAIN}}/privkey.pem
</VirtualHost>

# Redirect HTTP to HTTPS
<VirtualHost *:80>
    ServerName {{DOMAIN}}
    Redirect permanent / https://{{DOMAIN}}/
</VirtualHost>
