Total Pageviews

Friday, 24 June 2016

Vagrant box for Symfony2 Development

A simple Vagrant box for Symfony2 Development powered by Nginx, PHP-FPM and MySQL.



Install VirtualBox
On Ubuntu you can install VirtualBox using the following:
sudo apt-get install virtualbox
On Mac Os X you can download it here.
Install Vagrant & Librarian
gem install vagrant
gem install librarian
Clone the repository
git clone git://
cd vagrant-symfony2
mkdir viagrant #this is not a typo
Update Cookbooks
librarian-chef install
Download & Provision the Vagrant Box
Customize Vagrantfile with your app settings and then run:
vagrant up
Forward your local ports to the Vagrant box
Just edit your local machine /etc/hosts with an entry pointing to (the app's name on Vagrant file is the name of the Virtualhost):
...     yourappname.lo
If you need to work on your VagrantBox just fire up SSH:
vagrant ssh