# sudo apachectl configtest
<VirtualHost *:443>
    ServerAdmin davidix1991@gmail.com
    ServerName formha.mx
    ServerAlias www.formha.mx
    DocumentRoot /var/www/formha

    WSGIDaemonProcess app_formha user=www-data group=www-data threads=4 python-home=/var/www/formha/.venv
    WSGIScriptAlias / /var/www/formha/formha.wsgi

    ErrorLog /var/www/formha/log/error.log
    CustomLog /var/www/formha/log/access.log combined

    <Directory /var/www/formha>
        WSGIProcessGroup app_formha
        WSGIApplicationGroup %{GLOBAL}
        Require all granted
    </Directory>

    CacheEnable disk /


    <IfModule mod_cache_disk.c>
        CacheRoot /var/cache/apache2/mod_cache_disk
        CacheDirLevels 2
        CacheDirLength 1
        CacheMaxFileSize 1000000
        CacheMinFileSize 1
        CacheIgnoreHeaders Set-Cookie
        CacheIgnoreNoLastMod On

        <FilesMatch "\.(jpg|jpeg|png|gif|css|js)$">
            Header set X-Cache "HIT from Apache"
            CacheDefaultExpire 3600
            CacheMaxExpire 86400
            CacheLastModifiedFactor 0.5
        </FilesMatch>
    </IfModule>
</VirtualHost>