Created
January 14, 2014 20:55
-
-
Save bbrothers/8425510 to your computer and use it in GitHub Desktop.
Vagrant php config extended from fideloper / Vaprobash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Add repo for latest PHP | |
sudo add-apt-repository -y ppa:ondrej/php5 | |
# Update Again | |
sudo apt-get update | |
# Install PHP | |
sudo apt-get install -y php5-cli php5-mysql php5-pgsql php5-sqlite php5-curl php5-gd php5-mcrypt php5-xdebug php5-memcached | |
# xdebug Config | |
cat > /etc/php5/mods-available/xdebug.ini << EOF | |
xdebug.scream=1 | |
xdebug.cli_color=1 | |
xdebug.show_local_vars=1 | |
EOF | |
### From Installing Apache | |
echo "--- Enabling mod-rewrite ---" | |
sudo a2enmod rewrite | |
echo "--- Setting document root ---" | |
sudo rm -rf /var/www | |
sudo ln -fs /vagrant/public /var/www | |
echo "--- Enable Error Reporting ---" | |
sed -i "s/error_reporting = .*/error_reporting = E_ALL/" /etc/php5/apache2/php.ini | |
sed -i "s/display_errors = .*/display_errors = On/" /etc/php5/apache2/php.ini | |
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf | |
echo "--- Restarting Apache ---" | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment