ILR Vagrant Development VM
This repository is based on Zivtech's development virtual server.
- On Windows, you will need to have access to an ssh client, such as Git bash (which is installed with GitHub for Windows), Cygwin, or PuTTY.
- Vagrant (tested on V1.2.7)
- Navigate to your GitHub directory (if installed with GitHub for windows), or your standard development directory. Note that the current vhost setup fails if you're using the ~/Sites folder on OSX
- Clone this repository
- Clone a website respository (such as the ILR Website).
cp Vagrantfile.example Vagrantfile. This creates a working copy Vagrantfile in the root of this repository that points your virtual web server's docroot to vm's parent folder.
- ssh into the server with
sudo apt-get update && sudo apt-get upgradeon the server (click space-bar and hit enter if/when asked about grub)
- Enable Drush on the server (see section below)
- Finish the build with
- Reload vagrant with
You should now have a working Virtual Server, which can be accessed at
184.108.40.206. If you are setting up the ILR Website, follow additional instructions there.
Assuming you are setting up the site for a project such as the ILR Website, you will need to configure mysql on vagrant to accept connections from your host environment. The instructions are as follows:
- Issue the command
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
- Drush commands run on your host machine now have rights to connect as
rootto the mysql service on the virtual server
vagrant provision, if following installation steps)
Working with Multiple Sites
This project is currently set up to initialize with the apache2-default file, which configures a VirtualDocumentRoot to serve sites. We set it up this way so we can configure and run multiple websites within this one virtual environment.
The important line in that file sets the VirtualDocumentRoot to
/var/www/%2/docroot/, which uses the
%2 wildcard to grab the 2nd dot segment of the url and look for a folder with that name (i.e. www.ilr-website.dev will look for a folder called 'ilr-website' in the parent folder of the vagrant-development-vm). This also means that you'll need to edit your hosts file to point www.ilr-website.dev to 220.127.116.11.
If you're working with a Drupal multi-site configuration (such as the Projects bucket), you can create a subdomain to point to the correct multi-site (i.e. hoc.projects.dev would look in for a settings.php file in