Often, this is because you added a new site when the VM was already provisioned. This means that the server in the VM cannot find the index.php file in the folder you specified under the sites block in the Homestead.yaml file. Please let me know in the comments below if any of the above steps are unclear or could/should be simplified. This will allow you to seamlessly follow along with all our tutorials. You should now be able to quickly set up a new VM instance for every new app you intend to build. The default homestead database should show up when you connect.
#Vagrant php 5.2 pro#
To connect to it from the outside operating system (Homestead does not have PhpMyAdmin installed), use a tool like Sequel Pro or the MySQL Workbench and specify the following parameters:
#Vagrant php 5.2 password#
Its user is homestead and its password is secret. Homestead comes with MySQL pre-installed. If you want to open additional ports, like for example port 5000 for Heroku, uncomment the ports part of Homestead.yaml and add in the values, like so: ports : - send : 5000 If you have an account, uncomment the blackfire lines in Homestead.yaml and put your data in there.
#Vagrant php 5.2 code#
It’s a very powerful profiler for PHP apps which inspects code into great detail and draws complexity graphs which help you speed up your apps.
Homestead comes with Blackfire pre-installed. Once inside, you can use the VM as if it were a regular production or development linux server. Once all the sites have been added, boot the VM with: vagrant up To : /home/ vagrant / Code / test Booting Up and SSHing To : /home/ vagrant / Code / Project / public - map : test. You add new sites by adding new map/to pairs (as many as you wish): sites : - map : homestead. You can add this file while outside the VM, too, by simply creating a Project/public folder in the root of the cloned Homestead Improved VM, and adding index.php in there – this is the same as adding it inside the VM into the aforementioned location, because the folders are shared. This means (if you added it to etc/hosts in the step above) will look for index.php in the folder /home/vagrant/Code/Project/public inside the VM. To : /home/ vagrant / Code / Project / public The default is: sites : - map : homestead. Open the file Homestead.yaml in the cloned copy of the Homestead Improved repo, and add a pair for each. Step 2:įor every domain you defined in the above step, you need to add a sites mapping. This means I can access each of these domains in the browser via, or, etc. For example, I have this in my own hosts file: 192.168.
Replace homestead.app with your desired domain name, or just add in multiple domain names. Edit it as an administrator (one easy way to do this is to run a text editor like Sublime Text as Administrator) and add in an entry like this for every application you intend to develop: 192.168. On Windows, it’s in C:/Windows/System32/drivers/etc/, on OS X and Linux it’s in /etc/hosts. Step 1: Set up etc/hostsĮtc/hosts is a file present on every operating system. There are two steps to adding every new site into a Homestead VM. You can also do this manually by editing the folders field in Homestead.yaml. This allows you to use your main computer’s text editor / IDE to edit the files of a project inside the VM. That means you can edit files inside the project folder ( my_project) and they’ll be reflected inside the VM, and vice versa. The third one executes the folderfix script which shares the project’s folder with the Code folder inside the VM. The first two clone the project and enter the newly created folder. The following 3 commands are all that’s necessary for starting a new Homestead Improved VM instance on any operating system (obviously, replace my_project with your desired folder name): git clone https : ///swader/homestead_improved my_projectĬd my_project mkdir -p Project / public