# Turn environment variable TEST_HTTP_PORT into a server variable.
Define TEST_HTTP_PORT ${TEST_HTTP_PORT}
Include ${srcdir}/base_apache.conf
GnuTLSCache ${DEFAULT_CACHE}
# mod_status offers an easy way to check if we were actually
# redirected to HTTPS
LoadModule status_module ${AP_LIBEXECDIR}/mod_status.so
SetHandler server-status
# Configure mod_rewrite to redirect all HTTP request to HTTPS. Note
# that "RewriteOptions Inherit" must be set inside virtual hosts,
# otherwise they will ignore the global settings.
LoadModule rewrite_module ${AP_LIBEXECDIR}/mod_rewrite.so
RewriteEngine On
RewriteCond "%{HTTPS}" "off"
RewriteRule "(.*)" "https://${TEST_HOST}:${TEST_PORT}%{REQUEST_URI}" [R=301,L]
ServerName ${TEST_HOST}
RewriteOptions Inherit
ServerName ${TEST_HOST}
RewriteOptions Inherit
GnuTLSEnable On
GnuTLSCertificateFile authority/server/x509.pem
GnuTLSKeyFile authority/server/secret.key
GnuTLSPriorities NORMAL