I'm new to vagrant and followed along with the getting started tutorial and was able to initialize and run the precise32 box and serve a "hello world" index.html file from http://127.0.0.1:8080.
However, I want to run a PHP box so I grabbed the most popular LAMP box (scotch/box) off the vagrant cloud.
My problem is that when I run the setup command for the LAMP box:
vagrant init scotch/box; vagrant up --provider virtualbox
The box does not appear to boot up and instead I receive the following message:
Authentication failure. Retrying...
I have a brand new Virtual Box install (5.0.6) am on OSX (Yosemite) and I'm not trying to do anything out of the ordinary, just run a PHP machine. Any ideas where I'm going wrong?
I have no idea why several of the most popular boxes would not work for me... but for anyone else who comes across this, I just tried several boxes until I found one that actually worked as advertised (at least with my configuration). The box that worked for me was: smallhadroncollider/centos-6.5-lamp
Here are the full steps I took to create a working PHP environment using vagrant:
vagrant box add smallhadroncollider/centos-6.5-lamp
vagrant init smallhadroncollider/centos-6.5-lamp
vagrant init
command and comment-in the "forwarded_port" setting to allow host machine port 8080 (or whatever port you choose) to route to virtual server port 80.index.php
file in the same directory as your vagrant file. Run it from http://127.0.0.1:8080 and it should process your PHP codevagrant ssh
phpinfo()
function in your index.php
filesudo /etc/init.d/apache2 restart
. Ignore the "could not reliably determine... warning message."exit
vagrant box to return to your local machine. You're done and your PHP code should now be running with debug messages.