<VirtualHost *:80>
    ServerName staging.geneacase.example
    Redirect permanent / https://staging.geneacase.example/
</VirtualHost>

<VirtualHost *:443>
    ServerName staging.geneacase.example
    DocumentRoot /srv/geneacase/current/public

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/staging.geneacase.example/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/staging.geneacase.example/privkey.pem

    <Directory /srv/geneacase/current/public>
        AllowOverride All
        Options -Indexes -ExecCGI
        Require all granted
    </Directory>

    <FilesMatch "^\.">
        Require all denied
    </FilesMatch>

    ErrorLog ${APACHE_LOG_DIR}/geneacase-staging-error.log
    CustomLog ${APACHE_LOG_DIR}/geneacase-staging-access.log combined
</VirtualHost>
