WIP add a Docker-based test env
[plcapi.git] / tests / ci / config / apache_vhost
1 # Uses env var: TESTS_ROOT_DIR
2
3 <VirtualHost *:80>
4
5   DocumentRoot ${TESTS_ROOT_DIR}
6
7   ErrorLog "${TESTS_ROOT_DIR}/apache_error.log"
8   CustomLog "${TESTS_ROOT_DIR}/apache_access.log" combined
9
10   <Directory "${TESTS_ROOT_DIR}">
11     Options FollowSymLinks MultiViews
12     AllowOverride All
13
14     Require all granted
15
16     # needed for basic auth (PHP_AUTH_USER and PHP_AUTH_PW)
17     RewriteEngine on
18     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
19     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
20   </Directory>
21
22 </VirtualHost>
23
24 <IfModule mod_ssl.c>
25
26 <VirtualHost _default_:443>
27
28   DocumentRoot ${TESTS_ROOT_DIR}
29
30   ErrorLog "${TESTS_ROOT_DIR}/apache_error.log"
31   CustomLog "${TESTS_ROOT_DIR}/apache_access.log" combined
32
33   <Directory "${TESTS_ROOT_DIR}">
34     Options FollowSymLinks MultiViews
35     AllowOverride All
36
37     Require all granted
38
39     # needed for basic auth (PHP_AUTH_USER and PHP_AUTH_PW)
40     RewriteEngine on
41     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
42     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
43   </Directory>
44
45   SSLEngine on
46   # This cert is bundled by default in Ubuntu
47   SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
48   SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
49
50   <FilesMatch "\.(cgi|shtml|phtml|php)$">
51     SSLOptions +StdEnvVars
52   </FilesMatch>
53
54   BrowserMatch "MSIE [2-6]" \
55   nokeepalive ssl-unclean-shutdown \
56   downgrade-1.0 force-response-1.0
57   BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
58
59 </VirtualHost>
60
61 </IfModule>