Can't map project-folders in vagrant/Code folder - laravel

I am struggling with mapping in vagrant/code folder while configure homestead.when I do, it's shows empty.I spent hours on it but it,s not mapping.I am using OS X. I'll be thankful for your any help.
here is myhomestead.yaml file I want to copy my workspace folder to vagrant/Code
--
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Workspace
to: /home/vagrant/Code
sites:
- map: cgc.app
to: /home/vagrant/Code/CGC/public
databases:
- homestead
- cgc
variables:
- key: APP_ENV
value: local

Related

Homestead - This site refused to connect

I installed Virtual Box and Vagrant. I also set up my Homestead, but when I try to run my domain it doesn't load and shows the error - this site refused to connect. Here's my homestead.yaml file :
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/Users/Asus/Desktop/Projects/MVC
to: /home/vagrant/MVC
sites:
- map: infoStudio.test
to: /home/vagrant/MVC/public
databases:
- homestead
yaml files require specific new lines and indentations.
Take a look at this example.
For more information, take a look at the wiki.
The correct syntax for your file would be:
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/Users/Asus/Desktop/Projects/MVC
to: /home/vagrant/MVC
sites:
- map: infoStudio.test
- to: /home/vagrant/MVC/public
databases:
- homestead

Homestead.yaml file not adding project folder in vagrant | Mac os

I am using mac os and just install vagrant and configured homestead.yaml file but after vagrant up command also tried vagrant reload --provision
Also database not created in mysql.
Here is my homestead.yaml file
ip: "192.168.10.10"
memory: 3048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/myname/mytest
to: /home/vagrant/mytest
sites:
- map: mytest.local
to : /home/vagrant/mytest/public
databases:
- mytest
can someone help me ?
Finally, I found the solution.
to add path we need to add ~(tilde) sign it refers as a home directory in mac.
updated yaml file.
ip: "192.168.10.10"
memory: 3048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/myname/mytest
to: /home/vagrant/mytest
sites:
- map: mytest.local
to : /home/vagrant/mytest/public
databases:
- mytest

No input file selected using Homestead

I'm on Windows and i'm trying to work with Laravel Homestead.
Actually I have the problem of "No input file selected" seems like URL it's not correctly.
My real PATH is this:
C:\Users\Lluis\Projects Where I have my projects
And D:\Homestead_Projects where I want to copy it when make vagrant up.
My homestead.yaml file looks like here:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: c:/Users/Lluis/.ssh/id_rsa.pub
keys:
- c:/Users/Lluis/.ssh/id_rsa
folders:
- map: d:/Homestead_Projects
to: c:/Users/Lluis/Projects
sites:
- map: homestead.app
to: c:/Users/Lluis/Projects/puvik/public
databases:
- homestead
Anyone see the error? Thanks!
Edit Now file looks like here
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Projects
to: /home/vagrant/Projects
sites:
- map: homestead.test
to: /home/vagrant/Projects/puvik/public
databases:
- homestead
Your folder mapping is a little bit off.
Try this:
folders:
- map: c:/Users/Lluis/Projects
to: /home/vagrant/projects
sites:
- map: homestead.test
to: /home/vagrant/projects/puvik/public
Make sure you don't use .app anymore Chrome doesn't like it. use .test
On my case I had to do a vagrant provision to reload the VM
`vagrant provision`

Cannot get Homestead and Laravel working

I am getting 403 Forbidden when going to homestead.app but it works with homestead.app/public
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Desktop
to: /home/vagrant/Desktop
type: "nfs"
sites:
- map: valiant.dev
to: /home/vagrant/Desktop/Laravel
databases:
- homestead
Any help with this would be greatly appreciated, I am about to give up and go back to codeigniter.
Update your homestead.yaml file on .homestead folder to this
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Desktop/Code
to: /home/vagrant/Code
sites:
- map: valiant.app
to: /home/vagrant/Code/public
databases:
- homestead
Mapping folders syncing
folders:
- map: ~/Desktop/Code
to: /home/vagrant/Code
This means that we are going to sync the Desktop/Code folder and /home/vagrant/Code folder so that files are updated on both folders.
Mapping website
sites:
- map: valiant.app
to: /home/vagrant/Code/public
This means whenever you are going to hit valiant.app folder it will check /home/vagrant/Code/public path
Updating Hosts
When you have successfully configured the above one, do vim /etc/hosts and add the following line to the file
192.168.10.10 valiant.dev
Reloading Vagrant
Once you have done all the above mentioned tasks, cd into the Homestead directory on home folder and do the following
vagrant reload --provision
above command will create(if doesn't exist already) on vagrant machine and map them according. Now do
vagrant up
That should get you working.

Varant box shows phpinfo() Only

I use vagrant for my Laravel 5 application.
I only get "phpinfo()" page if i try to access my second domain.
1.homestead.app [Working]
2.lshop.app [show "phpinfo()"]
My homestead.yaml is,
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/laravel/public
- map: l5shop.app
to: /home/vagrant/Code/lshop/public
databases:
- homestead
What is Wrong ?
I get solution:
I just go and change the host file {/etc/hosts}.
Now its working fine.

Resources