Skip to content

Commit a993a75

Browse files
committed
Update hhvm continuous integration installation
1 parent 1e88df8 commit a993a75

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/before_script.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,17 @@ elif [[ "${TRAVIS_PHP_VERSION}" == "hhvm" ]]; then
3232
sudo add-apt-repository -y ppa:nginx/stable
3333
sudo apt-get update
3434
sudo apt-get install -y nginx
35-
sudo /usr/share/hhvm/install_fastcgi.sh
3635
root="$(pwd)/tests/PHPCurlClass"
37-
root="${root//\//\\/}"
38-
sudo sed --in-place --regexp-extended 's/listen 80 default_server;/listen 8000 default_server;/' /etc/nginx/sites-enabled/default
39-
sudo sed --in-place --regexp-extended "s/root \/usr\/share\/nginx\/html;/root ${root};/" /etc/nginx/sites-enabled/default
40-
sudo sed --in-place --regexp-extended 's/index index.html index.htm;/index index.php;/' /etc/nginx/sites-enabled/default
41-
sudo /etc/init.d/nginx restart
36+
sudo tee /etc/nginx/sites-enabled/default <<EOF
37+
server {
38+
listen 8000 default_server;
39+
root ${root};
40+
index index.php;
41+
server_name localhost;
42+
location / {
43+
rewrite ^ /index.php last;
44+
}
45+
}
46+
EOF
47+
sudo /usr/share/hhvm/install_fastcgi.sh
4248
fi

0 commit comments

Comments
 (0)