forked from jayhealey/Webception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_dependencies.sh
executable file
·40 lines (33 loc) · 1.11 KB
/
travis_dependencies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# Install everything
sudo apt-get install -qq apache2
# Configure Apache
WEBROOT="$(pwd)/public"
CGIROOT=`dirname "$(which php-cgi)"`
echo "WEBROOT: $WEBROOT"
echo "CGIROOT: $CGIROOT"
sudo echo "<VirtualHost *:80>
DocumentRoot $WEBROOT
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory $WEBROOT >
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
# Configure PHP as CGI
ScriptAlias /local-bin $CGIROOT
DirectoryIndex index.php index.html
AddType application/x-httpd-php5 .php
Action application/x-httpd-php5 '/local-bin/php-cgi'
</VirtualHost>" | sudo tee /etc/apache2/sites-available/default > /dev/null
cat /etc/apache2/sites-available/default
sudo a2enmod rewrite
sudo a2enmod actions
sudo service apache2 restart
# Configure custom domain
echo "127.0.0.1 webception" | sudo tee --append /etc/hosts
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"