Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Apache with PHP in Travis-CI
language: php
php:
- 5.3
- 5.4
before_script:
- sudo apt-get install apache2
- sudo a2enmod actions
- sudo a2enmod rewrite
- echo "export PATH=/home/vagrant/.phpenv/bin:$PATH" | sudo tee -a /etc/apache2/envvars > /dev/null
- echo "$(curl -fsSL https://gist.github.com/roderik/16d751c979fdeb5a14e3/raw/gistfile1.txt)" | sudo tee /etc/apache2/conf.d/phpconfig > /dev/null
- echo "$(curl -fsSL https://gist.github.com/roderik/2eb301570ed4a1f4c33d/raw/gistfile1.txt)" | sed -e "s,PATH,`pwd`/web,g" | sudo tee /etc/apache2/sites-available/default > /dev/null
- sudo service apache2 restart
- mysql -u root -e "CREATE USER 'myproject'@'localhost' IDENTIFIED BY 'mypass'"
- mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'myproject'@'localhost' WITH GRANT OPTION;"
- bin/vendors install
- app/console doctrine:database:create
- app/console doctrine:schema:update --force
- app/console doctrine:fixtures:load
@klein0r

This comment has been minimized.

Copy link

@klein0r klein0r commented Feb 11, 2014

Awesome! Thank you so much

@christopher-francisco

This comment has been minimized.

Copy link

@christopher-francisco christopher-francisco commented Sep 28, 2016

Does this work? Travis won't allow sudo.

@ziodave

This comment has been minimized.

@iliyaZelenko

This comment has been minimized.

Copy link

@iliyaZelenko iliyaZelenko commented Mar 2, 2019

2019: Apache + PHP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment