source: mod_gnutls/test/tests/26_redirect_HTTP_to_HTTPS/apache.conf @ a6aa387

asynciodebian/mastermainproxy-ticket
Last change on this file since a6aa387 was a6aa387, checked in by Fiona Klute <fiona.klute@…>, 5 years ago

Test suite: Update cache configuration, ensure unique cache paths

  • Property mode set to 100644
File size: 1.0 KB
Line 
1# Turn environment variable TEST_HTTP_PORT into a server variable.
2Define  TEST_HTTP_PORT  ${TEST_HTTP_PORT}
3
4Include ${srcdir}/base_apache.conf
5GnuTLSCache ${DEFAULT_CACHE}
6
7# mod_status offers an easy way to check if we were actually
8# redirected to HTTPS
9LoadModule      status_module   ${AP_LIBEXECDIR}/mod_status.so
10<Location /status>
11        SetHandler server-status
12</Location>
13
14# Configure mod_rewrite to redirect all HTTP request to HTTPS. Note
15# that "RewriteOptions Inherit" must be set inside virtual hosts,
16# otherwise they will ignore the global settings.
17LoadModule      rewrite_module  ${AP_LIBEXECDIR}/mod_rewrite.so
18RewriteEngine   On
19RewriteCond     "%{HTTPS}" "off"
20RewriteRule     "(.*)" "https://${TEST_HOST}:${TEST_PORT}%{REQUEST_URI}" [R=301,L]
21
22<VirtualHost _default_:${TEST_HTTP_PORT}>
23        ServerName      ${TEST_HOST}
24        RewriteOptions  Inherit
25</VirtualHost>
26
27<VirtualHost _default_:${TEST_PORT}>
28        ServerName              ${TEST_HOST}
29        RewriteOptions          Inherit
30        GnuTLSEnable            On
31        GnuTLSCertificateFile   server/x509.pem
32        GnuTLSKeyFile           server/secret.key
33        GnuTLSPriorities        NORMAL
34</VirtualHost>
Note: See TracBrowser for help on using the repository browser.