<VirtualHost *:80 *:8080>
    ServerAdmin webmaster@localhost
    ServerName ${ServerName}
    ServerAlias ${ServerAlias}

    DocumentRoot ${DocumentRoot}

    <Location /server-status>
       SetHandler server-status
       Order deny,allow
       Allow from all
    </Location>

    <Directory ${DocumentRoot}>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All 
       Order allow,deny
       allow from all
    </Directory>
    
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

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

</VirtualHost>

<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName ${ServerName}
    ServerAlias ${ServerAlias}

    DocumentRoot ${DocumentRoot}

    <Location /server-status>
       SetHandler server-status
       Order deny,allow
       Allow from all
    </Location>

    <Directory ${DocumentRoot}>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All 
       Order allow,deny
       allow from all
    </Directory>
    
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

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

    SSLEngine on

    SSLCertificateFile  /etc/ssl/certs/friendica.crt
    SSLCertificateKeyFile /etc/ssl/private/friendica.key

    <FilesMatch "\.(cgi|shtml|phtml|php)$">
        SSLOptions +StdEnvVars
    </FilesMatch>

    BrowserMatch "MSIE [2-6]" \\
        nokeepalive ssl-unclean-shutdown \\
        downgrade-1.0 force-response-1.0
    # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>