Categories
PHP

Moving Your PHP Projects to Vagrant

If you have read my last blog post, I have chosen to use one Linux box to locally develop web applications. In the last post, I discussed how I setup the Python/Django environment. In this one, I’m going to talk about PHP.

As usual, I installed the LAMP server:

I have all my PHP projects in “~/Sites”, I wanted to serve them from there. So removed the www directory.

Then I added my ~/Sites directory as a synced folder to be mounted as /var/www in the linux guest box. www-data is the user and group permission on these directories so Apache has no issues handling them.

My updated vagrant file:

Upgraded PHP to PHP 5.5 and installed PHPMyAdmin:

Updated my /etc/hosts to update the local dev domains to the IP address of the vagrant box 🙂