travis
[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
15     Require all granted
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     <Directory /usr/lib/cgi-bin>
30       Require all granted
31     </Directory>
32   </IfModule>
33
34 </VirtualHost>
35
36 <IfModule mod_ssl.c>
37
38 <VirtualHost _default_:443>
39
40   DocumentRoot %TRAVIS_BUILD_DIR%
41
42   ErrorLog "%TRAVIS_BUILD_DIR%/apache_error.log"
43   CustomLog "%TRAVIS_BUILD_DIR%/apache_access.log" combined
44
45   <Directory "%TRAVIS_BUILD_DIR%">
46     Options FollowSymLinks MultiViews ExecCGI
47     AllowOverride All
48
49     Require all granted
50
51     # needed for basic auth (PHP_AUTH_USER and PHP_AUTH_PW)
52     RewriteEngine on
53     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
54     RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
55   </Directory>
56
57   # Wire up Apache to use Travis CI's php-fpm.
58   <IfModule mod_fastcgi.c>
59     AddHandler php5-fcgi .php
60     Action php5-fcgi /php5-fcgi
61     Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
62     #FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
63     <Directory /usr/lib/cgi-bin>
64       Require all granted
65     </Directory>
66   </IfModule>
67
68   SSLEngine on
69   # This cert is bundled by default in Ubuntu
70   SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
71   SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
72
73   <FilesMatch "\.(cgi|shtml|phtml|php)$">
74     SSLOptions +StdEnvVars
75   </FilesMatch>
76
77   BrowserMatch "MSIE [2-6]" \
78   nokeepalive ssl-unclean-shutdown \
79   downgrade-1.0 force-response-1.0
80   BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
81
82 </VirtualHost>
83
84 </IfModule>