I am having problem with the correct routes for my Homestead.yaml file and is currently displaying the following "No input file specified."
The code is as follows:
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/sites
to: /home/vagrant/web/sites
sites:
- map: test.app
to: /home/vagrant/web/sites/test
databases:
- homestead
How would I correct my problems?
UPDATE
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/
to: /home/vagrant/web
sites:
- map: PGM.app
to: /home/vagrant/web/PGM/public
databases:
- homestead
The sites need to have an index file. For example, if you test directory is a Laravel or Lumen application, it has a public directory
sites:
- map: test.app
to: /home/vagrant/web/sites/test/public
Note the addition of public on the end of the path.
Once you've made changes to your Homestead.yml file, you'll need to re-provision the VM using the following to apply the changes.
homestead provision
Related
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
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
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`
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.
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.