Last active
August 29, 2015 13:57
-
-
Save rabidgremlin/9791791 to your computer and use it in GitHub Desktop.
Vagrant demo scripts
This file contains 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
Files for Vagrant demo |
This file contains 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
<?php | |
phpinfo(); | |
?> |
This file contains 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
<VirtualHost *:80> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
LogLevel warn | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
DocumentRoot /vagrant/www/ | |
<Directory /> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None | |
Order allow,deny | |
allow from all | |
</Directory> | |
</VirtualHost> |
This file contains 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
#!/bin/sh | |
# update apt | |
apt-get update | |
# install apache and php | |
apt-get -y install apache2 php5 libapache2-mod-php5 | |
# set up apache to point at /vagrant/www | |
cp /vagrant/apache.conf /etc/apache2/sites-enabled/000-default | |
service apache2 restart | |
echo "Done !" |
This file contains 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
Vagrant.configure(2) do |config| | |
config.vm.box = "hashicorp/precise32" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "512"] | |
end | |
config.vm.provision "shell", path: "bootstrap.sh" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment