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