This project will help you create a Vagrant managed Virtual Machine for developing Symfony Framework based projects
- Vagrant
- VirtualBox
Edit /etc/hosts so you can access created VM by symfony.dev domain. Add following line:
192.168.33.10 symfony.dev
vagrant up
Validate Apache and PHP works properly by opening PHP Info
Log in to VM and run
cd /vagrant/projects
symfony new symfony_project
ln -s /vagrant/projects/symfony_project/web /vagrant/web/symfony_project
Newly created symfony project is now in symfony_project
folder.
It should be available via web browser at Symfony App Example
Some small adjustments are needed:
Edit symfony_project/app/console
- Uncomment
umask(0000);
Edit symfony_project/web/app_dev.php
- Uncomment
umask(0000);
- Change allowed IP address to 192.168.33.1
array('127.0.0.1', 'fe80::1', '::1', '192.168.33.1')
Symfony project should be available HERE - eg. Example Page
Enjoy developing your Symfony based project :)
- Consider using Vagrant Cachier plugin
vagrant plugin install vagrant-cachier
- Consider using vagrant-winnfsd
vagrant plugin install vagrant-winnfsd
- Consider moving Symfony cache and logs to VM's folder
nater1067/Vagrant-Symfony-2 and other scripts and articles found on the web