Last active
August 29, 2015 14:10
-
-
Save jnyryan/ff71b95cac948e6895f2 to your computer and use it in GitHub Desktop.
Vagrantfile to setup a NGINX server
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
| #!/bin/bash | |
| apt-get install -y software-properties-common python-software-properties | |
| add-apt-repository ppa:chris-lea/node.js | |
| apt-get update | |
| apt-get install -y nginx |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "trusty64" | |
| config.vm.provision "shell", path: "install.sh" | |
| # The url from where the 'config.vm.box' box will be fetched if it | |
| # doesn't already exist on the user's system. | |
| config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" | |
| config.vm.network :forwarded_port, guest: 80, host: 8080 | |
| config.vm.provider :virtualbox do |vb| | |
| # # Don't boot with headless mode | |
| # vb.gui = true | |
| # Use VBoxManage to customize the VM. For example to change memory: | |
| vb.customize ["modifyvm", :id, "--memory", "2048"] | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment