allow http auth to work in curl mode; add tests for basic and digest auth; refactor...
[plcapi.git] / tests / ci / travis / apache_vhost
1 # Configuration file for Apache running on Travis.
2 # PHP setup in FCGI mode
3
4 <VirtualHost *:80>
5
6   DocumentRoot %TRAVIS_BUILD_DIR%
7
8   ErrorLog "%TRAVIS_BUILD_DIR%/apache_error.log"
9   CustomLog "%TRAVIS_BUILD_DIR%/apache_access.log" combined
10
11   <Directory "%TRAVIS_BUILD_DIR%">
12     Options FollowSymLinks MultiViews ExecCGI
13     AllowOverride All
14     Order deny,allow
15     Allow from all
16
17     # needed for basic auth (PHP_AUTH_USER and PHP_AUTH_PW)
18     RewriteEngine on
19     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
20     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
21   </Directory>
22
23   # Wire up Apache to use Travis CI's php-fpm.
24   <IfModule mod_fastcgi.c>
25     AddHandler php5-fcgi .php
26     Action php5-fcgi /php5-fcgi
27     Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
28     FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
29   </IfModule>
30
31 </VirtualHost>
32
33 <IfModule mod_ssl.c>
34
35 <VirtualHost _default_:443>
36
37   DocumentRoot %TRAVIS_BUILD_DIR%
38
39   ErrorLog "%TRAVIS_BUILD_DIR%/apache_error.log"
40   CustomLog "%TRAVIS_BUILD_DIR%/apache_access.log" combined
41
42   <Directory "%TRAVIS_BUILD_DIR%">
43     Options FollowSymLinks MultiViews ExecCGI
44     AllowOverride All
45     Order deny,allow
46     Allow from all
47
48     # needed for basic auth (PHP_AUTH_USER and PHP_AUTH_PW)
49     RewriteEngine on
50     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
51     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
52   </Directory>
53
54   # Wire up Apache to use Travis CI's php-fpm.
55   <IfModule mod_fastcgi.c>
56     AddHandler php5-fcgi .php
57     Action php5-fcgi /php5-fcgi
58     Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
59     #FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
60   </IfModule>
61
62   SSLEngine on
63   # This cert is bundled by default in Ubuntu
64   SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
65   SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
66
67   <FilesMatch "\.(cgi|shtml|phtml|php)$">
68     SSLOptions +StdEnvVars
69   </FilesMatch>
70
71   BrowserMatch "MSIE [2-6]" \
72   nokeepalive ssl-unclean-shutdown \
73   downgrade-1.0 force-response-1.0
74   BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
75
76 </VirtualHost>
77
78 </IfModule>