- # enable php-fpm/hhvm-fcgi
- - sudo a2enmod rewrite actions fastcgi alias
- - if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- - echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
- - if [ $TRAVIS_PHP_VERSION = "hhvm" ]; then hhvm -m daemon -vServer.Type=fastcgi -vServer.Port=9000 -vServer.FixPathInfo=true
- # configure apache virtual hosts
- - if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then sudo cp -f .travis/apache_vhost /etc/apache2/sites-available/default
- - if [ $TRAVIS_PHP_VERSION = "hhvm" ]; then sudo cp -f .travis/apache_vhost_hhvm /etc/apache2/sites-available/default
- - sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
-
- - sudo service apache2 restart
+ # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against
+ - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_php_fpm.sh; ./tests/ci/travis/setup_apache.sh; fi
+ - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_hhvm.sh; ./tests/ci/travis/setup_apache_hhvm.sh; fi
+ - ./tests/ci/travis/setup_privoxy.sh