# Enable SSL and a supported PHP handler before using this virtual host.
<VirtualHost *:80>
    ServerName assessment.example.org
    Redirect permanent / https://assessment.example.org/
</VirtualHost>
<VirtualHost *:443>
    ServerName assessment.example.org
    DocumentRoot /var/www/jhasi-assessment/public
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/assessment.example.org/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/assessment.example.org/privkey.pem
    <Directory /var/www/jhasi-assessment/public>
        Options -Indexes
        AllowOverride None
        Require all granted
        DirectoryIndex index.php
    </Directory>
    <FilesMatch "^\.">
        Require all denied
    </FilesMatch>
    LimitRequestBody 26214400
    # Adjust this for the installed PHP-FPM version, or use the server's PHP handler.
    <FilesMatch "\.php$">
        SetHandler "proxy:unix:/run/php/php8.4-fpm.sock|fcgi://localhost/"
    </FilesMatch>
</VirtualHost>
