# This example config loads SqWebMail at https://www.example.com/cgi-bin/sqwebmail.
# It requires that mod_cgi or mod_cgid be enabled.
<VirtualHost *:443>
    # Specify the Server Name.
    ServerName www.example.com

    # Enable SSL.
    SSLEngine               on
    SSLCertificateFile      /path/to/fullchain.pem
    SSLCertificateKeyFile   /path/to/privkey.pem

    # Set the script alias.  This isn't needed if you have enabled Debian's
    # default /etc/apache2/conf-available/serve-cgi-bin.conf.
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

    # Set the cgi-bin directory permissions.  This isn't needed if you have
    # enabled Debian's default /etc/apache2/conf-available/serve-cgi-bin.conf.
    <Directory "/usr/lib/cgi-bin">
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        AllowOverride None
        Require all granted
    </Directory>

    # Set the sqwebmail alias, which is used to load CSS and other assets.
    Alias /sqwebmail/ /usr/share/sqwebmail/

    # Set the sqwebmail directory permissions.
    <Directory /usr/share/sqwebmail/>
        Options None
        Require all granted
        AllowOverride None
    </Directory>
</VirtualHost>
