source: mod_gnutls/test/tests/31_vhost_SNI_serveralias_match/apache.conf @ e63515a

asyncio
Last change on this file since e63515a was e63515a, checked in by Fiona Klute <fiona.klute@…>, 15 months ago

Fix SNI/ServerAlias matching

ServerAliases? were never checked if ServerName? was set, which is
obviously wrong, and the test did not verify if the correct virtual
host had been selected. Fix this by checking ServerName?, explicit
ServerAliases?, and wildcard ServerAliases? in order, and returning the
first match. Also the test now verifies the selected virtual host and
tests a wildcard match in addition to an explicit ServerAlias?.

  • Property mode set to 100644
File size: 712 bytes
Line 
1Include ${srcdir}/base_apache.conf
2
3GnuTLSCache ${DEFAULT_CACHE}
4
5LoadModule      rewrite_module  ${AP_LIBEXECDIR}/mod_rewrite.so
6
7<VirtualHost _default_:${TEST_PORT}>
8        ServerName      vhost.example.com
9        GnuTLSEnable    On
10        GnuTLSCertificateFile   authority/server/x509.pem
11        GnuTLSKeyFile           authority/server/secret.key
12</VirtualHost>
13
14<VirtualHost _default_:${TEST_PORT}>
15        ServerName      ${TEST_HOST}
16        ServerAlias     test.example.com
17        ServerAlias     *.virtual.host
18        GnuTLSEnable    On
19        GnuTLSCertificateFile   authority/server/x509.pem
20        GnuTLSKeyFile           authority/server/secret.key
21        # Use mod_rewrite to set up a path that will work only on this
22        # virtual host
23        RewriteEngine   On
24        RewriteRule     "^/vhost/test\.txt$" "/test.txt" [PT]
25</VirtualHost>
Note: See TracBrowser for help on using the repository browser.