Skip to content

Commit 7173b4c

Browse files
Tidy up travis.yml a bit
1 parent 0960584 commit 7173b4c

File tree

2 files changed

+31
-41
lines changed

2 files changed

+31
-41
lines changed

.travis.yml

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,22 @@
11
language: php
2-
32
env:
43
- WEB_PORT_80_TCP_ADDR=localhost
5-
64
sudo: required
75
dist: trusty
8-
96
php:
107
- 5.4
118
- 5.5
129
- 5.6
1310
- 7.0
14-
1511
addons:
1612
hosts:
1713
- local.dev
18-
1914
matrix:
2015
fast_finish: true
21-
2216
cache:
2317
- apt
24-
2518
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
6020
script:
6121
# Do a lookup on local.dev hostname set above
6222
- nslookup local.dev

travisCI/install-apache.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
############################################################
3+
# Let us Setup Apache2 for Ubuntu 16.04 with Php 7 and MySQL
4+
############################################################
5+
# Install Apache2
6+
sudo apt-get update
7+
sudo apt-get install -y --force-yes apache2
8+
# Add PHP 7.0 Repository
9+
sudo add-apt-repository -y ppa:ondrej/php
10+
# Install PHP 7.0
11+
sudo apt-get update
12+
sudo apt-get install -y --force-yes php7.0 libapache2-mod-php7.0 php7.0-fpm
13+
# Copy our virtual host template to sites-enabled overwriting the default site conf
14+
sudo cp travisCI/defaultsite.tpl /etc/apache2/sites-available/000-default.conf
15+
# Copy basic testing files into /var/www
16+
sudo cp www/info.php /var/www/info.php
17+
sudo cp www/apache.php /var/www/apache.php
18+
# Enable mod rewrite module
19+
sudo a2enmod rewrite
20+
# Set ServerName Globally
21+
sudo cp travisCI/servername.tpl /etc/apache2/conf-available/servername.conf
22+
# Add testing of Apache Bad Bot Blocker
23+
sudo mkdir /etc/apache2/custom.d
24+
cd /etc/apache2/custom.d
25+
sudo wget https://raw.githubusercontent.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/master/custom.d/globalblacklist.conf
26+
sudo a2enconf servername
27+
# Restart apache
28+
sudo service apache2 restart
29+
# Restart PHP
30+
sudo service php7.0-fpm restart

0 commit comments

Comments
 (0)