<VirtualHost *:80>

        ServerName local.project.com
        ServerAdmin admin@project.com
        DocumentRoot /var/www/html

        <Directory "/var/www/html">
                AllowOverride All
        </Directory>

        RewriteEngine On
        RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d
        RewriteCond %{REQUEST_URI} !(.*)/$
        RewriteCond %{HTTP:X-Forwarded-Proto} https
        RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}/ [L,R=301]

        Header edit Set-Cookie ^(.*)$ $1;SameSite=None

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

</VirtualHost>

<VirtualHost *:443>

        ServerName local.project.com
        ServerAdmin admin@project.com

        DocumentRoot /var/www/html

        <Directory "/var/www/html">
                AllowOverride All
        </Directory>

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

        SSLEngine on

        SSLCertificateFile      /etc/ssl/certs/knolskape_public.crt
        SSLCertificateChainFile /etc/ssl/certs/knolskape_intermediate.crt
        SSLCertificateKeyFile   /etc/ssl/private/knolskape_private.key

        Header edit Set-Cookie ^(.*)$ $1;SameSite=None

</VirtualHost>