# Port 80 : validation Let's Encrypt (certbot --webroot), sinon redirection vers HTTPS.
# À activer en premier : il ne dépend d'aucun certificat (voir deploy/README.md).
<VirtualHost *:80>
    ServerName cederconsulting.com
    ServerAlias www.cederconsulting.com

    Alias /.well-known/acme-challenge/ /var/www/certbot/.well-known/acme-challenge/
    <Directory /var/www/certbot>
        Options -Indexes
        Require all granted
    </Directory>

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
    RewriteRule ^ https://www.cederconsulting.com%{REQUEST_URI} [R=301,L]

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