I am trying to figure out if there is something wrong in my homestead setup
I am following the official direction. In the very end of the direction the tutorial said that accessing http://homestead.app is possible. However when I run the address in my chrome I get the No input file specified. message
I am not sure if this is the default page, so I checked my directory using
homestead ssh
and found out that
- map: /Users/Projects
to: /home/vagrant/Projects
both directory doesn't have any files inside, I am not sure if this is the default behavior, but according to this tutorial there should be a list of file in the folder
app artisan bootsrap composer.json composer.lock ....
I don't remember if homestead comes with a default website, but your homestead.yaml ( you can use homestead edit to open it )file should look like this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders: //This is where vagrant will look for your projects
- map: ~/Code //This is your host folder
to: /home/vagrant/Code //This is your homestead folder
sites: //These are the urls that nginx will serve
- map: homestead.app
to: /home/vagrant/Code/homestead/public
- map: site2.app
to: /home/vagrant/Code/site2/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
Usually, homestead comes with a Code folder where you can find the laravel project (if there is one by default).
Also, remeber to add the urls to your hosts files.
Related
I've installed Laravel Homestead and edited my host file but when I visit the specified URL in my browser I get the message "No input file specified." after running "vagrant up" in terminal. My initial guess is something's incorrect in the Homestead.yaml file but I can't see what.
I'm running Mac OS and my VM is a VirtualBox one. All my websites are in a folder called "Sites" which is a direct child of the OS user, so Username/Sites. The path of my Homestead folder is also in there like this: _Username/Sites/_homestead".
In the Homestead.yaml file I set my 'folder' to map: ~/Sites - that should mean when I visit the specified URL in the browser I get a list of folders (all of my websites), right? Or at least that was the result I'm expecting.
If I type ~Sites/ in my browser address bar I do see a list of folders so the location is correct. It redirects to file:///Users/USERNAME/Sites/
Before I run vagrant up 'username.dev' will not work when typed in the address bar, afterwards it does. So I assume that's all correct as it does pick it up.
This is the contents of my Homestead.yaml file for reference:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Sites
to: /home/vagrant/Code
sites:
- map: username.dev
to: /home/vagrant/Code/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
Can anyone see what's wrong or advise on what else is could be?
Apparently you have to specify a specific folder, but if you want to switch quickly between your different projects you can map to multiple directories in the homestead.yaml file like that:
sites:
- map: firstProject.dev
to: /home/vagrant/Code/firstProject/public
- map: secondProject.dev
to: /home/vagrant/Code/secondeProject/public
You executed the command vagrant up --provision and still the same output?
I found similar questions which might help you here :
Using Laravel Homestead: 'no input file specified' and After installing Homestead I get "No input file specified" in the browser. How can I access my laravel project
if the folder Username/Sites contains different site folders, try to map the URL to: /home/vagrant/Code/yourSiteFolderName/public
and run vagrant reload --provision or vagrant up --provision to reload the configuration
For me after hours of searching I realized I had a capitalization error :(
- map: C:/Users/jason/Code/blog
to: /home/vagrant/Code/blog
sites:
- map: blog.test
to: /home/vagrant/***code***/blog/public
Code was code in the sites to: section.
So just an caution to everyone to check for the simplest errors first ;)
I'm trying to set up laravel 5.5 working with homestead.
I've followed the steps here up to and including launching the vagrant box.
However, typing "dev.todoparrot.com" or "192.168.10.10" into browser brings up "No input file specified." error.
Trying
vagrant up --provision
(since I made changes to homestead.yaml) did not fix it.
My homestead.yaml looks like:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:/Users/User/.ssh/id_rsa.pub
keys:
- C:/Users/User/.ssh/id_rsa
folders:
- map: D:/projects/todoparrot
to: /home/vagrant/Code
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/todoparrot/public
I've installed laravel 5.5 into "D:/projects/todoparrot" with composer. Running php artisan serve on this folder works normally - template site is found at http://127.0.0.1:8000/.
Running
vagrant ssh
or Putty and navigating to /Code and typing ls returns the same files that are in "D:/projects/todoparrot", so the sync is working.
Changing
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/todoparrot/public
to
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/public
fixed my problem. Following tutorial without thinking about what I'm doing was the root of my mistake.
I installed Laravel with Homestead and tried to start a project that I created. Therefore I adjusted the Homestead.yaml to:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Documents/Development/Source/MFServer/
to: /home/vagrant/Code
sites:
- map: local.medifaktor
to: /home/vagrant/Code/MFServer/public
The path is existing but still I get this error message. Can you give me some advice?
I think this only works when you need to reload the file and there is no other problems.
From Jesús' site: http://www.jesusamieiro.com/no-input-file-specified-using-homestead/
“No input file specified” using Homestead - Posted on 02/06/2016
If you see the message “No input file specified” in the browser (using Homestead as development VM machine), one possible problem is that Homestead doesn’t load the parameters from the config file Homestead.yaml
Try to provision the VM another time, running
$ vagrant reload --provision
I'm working with Homestead. Laravel apps are just serving fine, but when I try to setup some custom script, it shows me that No input file specified.
Here is my yaml file.
---
ip: "192.168.30.30"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/Mubin/Sites
to: /home/vagrant/Code
sites:
- map: test.app
to: /home/vagrant/Code/test/public
- map: dev.app
to: /home/vagrant/Code/dev/index.php
databases:
- homestead
I just want to put all my code under dev folder and want to access it from vagrant homestead box
Guide where am I doing wrong?
PS.
I tried to remove index.php from the end, and then nginx throws 403 Forbidden
anyone having the same issue, I found a solution, mocked one may be; but it did work for me.
I added new public folder in my dev folder and place all my other custom PHP scripts put in that.
Directory structure was something like this for me
dev
public
folder1
index.php
folder2
index.php
folder3
index.php
...
and I was able to access it like this
dev.local/folder1/index.php
dev.local/folder2/index.php
dev.local/folder3/index.php
and here is my Homestead.yaml file
---
ip: "192.168.30.30"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/Mubin/Sites
to: /home/vagrant/Code
sites:
- map: test.app
to: /home/vagrant/Code/test/public
- map: dev.local
to: /home/vagrant/Code/dev/public
databases:
- homestead
and in my /etc/hosts file
127.0.0.1 dev.local test.app
Hope this will help someone, someday. :)
I'd set up vagrant for laravel and custom PHP projects. Also, integrated with PHP Storm to work with x-debug. Leave a message if you've any issue.
Happy coding, x-debugging.
So I have installed laravel through composer, the virtual box machine and homestead. Everything is fine but now when I try to access the url homestead.app as shown in the instructions, I get the No input file specified. Below is the content of my homestead.yaml... for the folders, I pointed it to my local area where I have the laravel source called installed under XAMPP/htdocs... What am I doing wrong ?
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/xampp/htdocs/learning-laravel-5/public
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
Your configuration is a bit off I believe.
First you map your project's public directory to you virtual box's Code directory. Then you map your site to the Laravel/public directory inside the directory you just mapped. So in fact you are trying to access C:/xampp/htdocs/learning-laravel-5/public/Laravel/public from you web server, which probabaly doesn't exist.
Personally I would map my VM's Code directory to my htdocs folder. This way you will have access to all files in there from inside your VM. Your site should be mapped slightly diffrent as well then. I believe it would look similar to this:
...
folders:
- map: C:/xampp/htdocs
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/learning-laravel-5/public
...
Also, don't forget to set up a host to have homestead.app point to the correct IP (192.168.10.10)