|
1 | 1 | language: php |
2 | | - |
3 | 2 | env: |
4 | 3 | - WEB_PORT_80_TCP_ADDR=localhost |
5 | | - |
6 | 4 | sudo: required |
7 | 5 | dist: trusty |
8 | | - |
9 | 6 | php: |
10 | 7 | - 5.4 |
11 | 8 | - 5.5 |
12 | 9 | - 5.6 |
13 | 10 | - 7.0 |
14 | | - |
15 | 11 | addons: |
16 | 12 | hosts: |
17 | 13 | - local.dev |
18 | | - |
19 | 14 | matrix: |
20 | 15 | fast_finish: true |
21 | | - |
22 | 16 | cache: |
23 | 17 | - apt |
24 | | - |
25 | 18 | before_install: |
26 | | - ############################################################ |
27 | | - # Let us Setup Apache2 for Ubuntu 16.04 with Php 7 and MySQL |
28 | | - ############################################################ |
29 | | - # Set Server Host Name - Travis hostnames resolve to 127.0.53.53 - Not having any effect on fixing Travis "Hostname was NOT found in DNS cache" error - not a problem though |
30 | | - #- echo "127.0.0.1 local.dev" | sudo tee -a /etc/hosts |
31 | | - #- echo "127.0.53.53 local.dev" | sudo tee -a /etc/hosts |
32 | | - #- echo "169.254.169.254 local.dev" | sudo tee -a /etc/hosts |
33 | | - # Install Apache2 |
34 | | - - sudo apt-get update |
35 | | - - sudo apt-get install -y --force-yes apache2 |
36 | | - # Add PHP 7.0 Repository |
37 | | - - sudo add-apt-repository -y ppa:ondrej/php |
38 | | - # Install PHP 7.0 |
39 | | - - sudo apt-get update |
40 | | - - sudo apt-get install -y --force-yes php7.0 libapache2-mod-php7.0 php7.0-fpm |
41 | | - # Copy our virtual host template to sites-enabled overwriting the default site conf |
42 | | - - sudo cp travisCI/defaultsite.tpl /etc/apache2/sites-available/000-default.conf |
43 | | - # Copy basic testing files into /var/www |
44 | | - - sudo cp www/info.php /var/www/info.php |
45 | | - - sudo cp www/apache.php /var/www/apache.php |
46 | | - # Enable mod rewrite module |
47 | | - - sudo a2enmod rewrite |
48 | | - # Set ServerName Globally |
49 | | - - sudo cp travisCI/servername.tpl /etc/apache2/conf-available/servername.conf |
50 | | - # Add testing of Apache Bad Bot Blocker |
51 | | - - sudo mkdir /etc/apache2/custom.d |
52 | | - - cd /etc/apache2/custom.d |
53 | | - - sudo wget https://raw.githubusercontent.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/master/custom.d/globalblacklist.conf |
54 | | - - sudo a2enconf servername |
55 | | - # Restart apache |
56 | | - - sudo service apache2 restart |
57 | | - # Restart PHP |
58 | | - - sudo service php7.0-fpm restart |
59 | | - |
| 19 | + - travisCI/install-nginx.sh |
60 | 20 | script: |
61 | 21 | # Do a lookup on local.dev hostname set above |
62 | 22 | - nslookup local.dev |
|
0 commit comments