Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

_Rich's avatar
Level 1

[ Solved ] 95% to Homestead app! - but still stuck on 'No input file specified'

Hi guys! Having a bit of trouble getting my first Laravel app to display - I’m pretty sure VirtualBox, Vagrant etc is working correctly, but when I go to homestead.app in Chrome = No input file specified.

I know a common cause could be incorrect path mapping in the homestead.yaml file. I double checked mine, it seems OK, but it would be awesome if someone here could take a look at my set up below and see if anything simple/obvious is wrong.. thanks!

Mac OSX 10.11.6 Laravel Installer 1.3.3 Composer version 1.3.1 Virtual box 5.1.14 Vagrant 1.9.1

/etc/hosts has the line: 192.168.10.10 homestead.app

I have the directory: ~/Code/homestead installed via $ laravel new homestead

~/Homestead directory is there ~/Code directory is there

$ cd Homestead $ vagrant up

Seems to launch fine.. then when visiting homestead.app in Chrome = "No input file specified".

Here’s my homestead.yaml

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

databases:
    - homestead

etc...

I'm sure I'm doing something not quite right, as I've tried to repeat the instructions on the Laravel site a few times now, and mostly got hung and this point. Really looking forward to getting back into Laravel after almost 3 years away.. Hopefully this can be resolved!

Many thanks - Rich.

0 likes
33 replies
emirk's avatar

Replace:

/home/vagrant/Code/Laravel/public

with:

/home/vagrant/Code/homestead/public

After that you need to fire "vagrant provision"

And give it a try.

_Rich's avatar
Level 1

Hey sk4yb3n, -thanks man!

Definitely on the right track - just a couple of missing file messages for a /home/vagrant/Code/homestead/bootstrap/autoload.php file -

screenshot of error if needed: http://pasteboard.co/wk3L3cupT.png

Thanks again mate.

_Rich's avatar
Level 1

Please bear with me guys!

-I followed the suggestion on the below link and ran $ composer install in the root directory (inside the 'homestead' app) here ~/Code/homestead/

But I could be doing this in the wrong directory - I see this too /home/vagrant/Code/learning-laravel-5 in the below link and would think mine is /home/vagrant/Code/homestead but there's a mention of "Running composer install in the root of the project (on vagrant box)" - not sure how to cd into root on the vagrant box.

Feeling a bit dense at the moment!

Thanks

https://laracasts.com/discuss/channels/general-discussion/local-laravel-5-site-outputs-warning-error?page=1

emirk's avatar

I strongly recommend you to watch Laracasts series, Laravel from scratch, they for sure will clear your paths.

Cheers

1 like
michaelnguyen547's avatar

The error means your 'sites' setting in homstead.yaml points to wrong directories.

sites:
    - map: homestead.app
      to: /home/vagrant/Code/Laravel/public

You are telling the web server that your Laravel application is at /home/vagrant/Code.

On your Mac, to get in Vagrant box, run

vagrant ssh // this should be at the same directory where you ran vagrant up

# or

ssh [email protected] // this works as well

in your Vagrant Box now, change directory

cd /home/vagrant/Code

then create a new Laravel project either by Laravel or composer command See Laravel Installation

laravel new Laravel

or

composer create-project --prefer-dist laravel/laravel Laravel

it should work

_Rich's avatar
Level 1

Thanks sk4yb3n, yup started out with that and intend to continue - just looking to get my first app up & running & go from there - cheers!

michaelnguyen547, thanks for the details!

I got into the vagrant box and: /home/vagrant/Code and thought I'd check if there was any content already there:

homestead
vagrant@homestead:~/Code$ cd homestead
vagrant@homestead:~/Code/homestead$ ls
app  artisan  bootstrap  composer.json  composer.lock  config  database  package.json  phpunit.xml  public  readme.md  resources  routes  server.php  storage  tests  webpack.mix.js  yarn.lock
vagrant@homestead:~/Code/homestead$ ```




_Rich's avatar
Level 1

So should I ignore this and create a new Laravel project inside the vagrant box /home/vagrant/Code using the Laravel Installer as you suggest? - then would I need to do the same on my Mac in ~/Code/ ?

This seems to be a little different from what I read on the Laravel Homestead docs here ( https://laravel.com/docs/5.4/homestead ) which has: "Launching The Vagrant Box Once you have edited the Homestead.yaml to your liking, run the vagrant up command from your Homestead directory."

I'm a bit confused if I should be using the Laravel Installer in my ~/Code directory on my Mac to create the site & then changes are mirrored in the vagrant box mapped in the .yaml file.. This part of the documentation seems a little ambiguous, most likely because I'm not familiar with the Vagrant method.

Thanks, R

michaelnguyen547's avatar

@_Rich

You must run Laravel Installer inside the Vagrant Box

if you want to keep your current project, update your yaml to

sites:
    - map: homestead.app
      to: /home/vagrant/Code/homestead/public

then followed by

vagrant reload --provision 

Or you can try my above instructions to create a new project

_Rich's avatar
Level 1

@michaelnguyen547

Thanks for your help. Unfortunately nothing I've tried in the last 3 days is getting this to work correctly and following the laracasts tutorial wasn't successful either. As much as I want to use Homestead, I may have to go the MAMP route.

ejdelmonico's avatar

@_rich You do not create a laravel app within the Homestead VM. That is not good information on how to do it. Whenever you start a new laravel project, first run composer global update to make sure you have the most recent installer. Then create the app in your $HOME folder directory that you set up...yours looks like you are using "code". Then, go to ~/.homestead/Homestead.yaml and make sure you give the app a name and map it to the directory you created the project in...now they will sync. Also, if you are using a DB other Sqlite, then place the name after the homestead one. If you do not and have more than one app, all data will be overwritten because they are using the same DB. After that, go to /etc/host and add the app. Then run vagrant up to provision the VM. If you are doing an upgrade to Homestead, then remove the box and make sure it is gone from VirtualBox before you run vagrant up.

The only time you may need to do anything inside of the VM is when you run artisan commands if you don't have a alias for it. That is what is great about it because you never have to touch the VM after provision. Any other methods make it a giant mess and you will have to nuke everything and start over.

_Rich's avatar
Level 1

@ejdelmonico - thanks for the feedback. So here's where I'm at so far,

  1. I ran composer global update - that was successful, then:
  2. cd into ~/Code directory, and did laravel new homestead
  3. opened ~/.homestead/Homestead.yaml and added:
    - map: ~/Code
      to: /home/vagrant/Code

sites:
    - map: homestead.app
      to: /home/vagrant/Code/homestead/public
  1. opened /etc/host and added 192.168.10.10 homestead.app into it
  2. Then finally ran vagrant up from within ~/Code directory and received the below message.
Application ready! Build something amazing.
richs-iMac:Code rich$ vagrant up
A Vagrant environment or target machine is required to run this
command. Run `vagrant init` to create a new Vagrant environment. Or,
get an ID of a target machine from `vagrant global-status` to run
this command on. A final option is to change to a directory with a
Vagrantfile and to try again.

Did I miss a step somewhere?

Thanks.

Cronix's avatar

did you run vagrant up from the homestead dir on your local machine?

_Rich's avatar
Level 1

@Cronix - Hi, thanks.

I ran it from within the ~/Code dir on my local machine - do you mean run vagrant up from within the ~/Homestead directory where I initially git cloned Homestead? - or do you mean inside the ~/Code/homestead app directory?

_Rich's avatar
Level 1

Checking the documentation again, I see that vagrant up should be run inside the ~/Homestead directory, so I did that and also vagrant provision

http://homestead.app/ is outputting No input file specified. from my first comment above, I think this is back to the mapping issue...

ejdelmonico's avatar

OK, you have to cd Homestead and run your vagrant commands from the homestead directory unless you made them global. So for me, I cd into Homestead and run vagrant up and all other vagrant commands. Not the directory where your new project is installed but where you cloned Homestead to.

ejdelmonico's avatar

@ _rich Please provide your entire Homestead.yaml code and your /etc/hosts so I can see.

_Rich's avatar
Level 1

@ejdelmonico - Sure thing, thanks for taking a look..

---
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/homestead/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
ejdelmonico's avatar

So you definitely made a Code directory and that is where you initiated the new laravel project?? If so, then make sure your /etc/hosts entry is at the bottom of the file.

You did run npm install or yarn and then npm run dev after you downloaded the project right?

_Rich's avatar
Level 1

@ejdelmonico - Thanks. Yup, I initiated the new project after cd'ing into ~/Code using laraval new homestead

Here's my /etc/hosts content in case it helps...

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
192.168.10.10  homestead.app
~                                                                                                          
~                                                                                                          
~ 

I didn't npm install or npm run dev after setting up via laraval new homestead - didn't know about that step. Should I try that inside ~/Code/homestead dir?

ejdelmonico's avatar

Your /etc/hosts file should look something like this:

https://cl.ly/j7kj

absolutely, you must run those commands after downloading the project inside of code/homestead in your $HOME directory...not VM

_Rich's avatar
Level 1

@ejdelmonico - Yup, it does. I only have one Laravel app so far (homestead.app) so there's no extra 192.168.10.10 lines like yours..

_Rich's avatar
Level 1

@ejdelmonico - OK thanks, will run npm install then npm run dev inside ~/Code/homestead dir

ejdelmonico's avatar

Did you do yarn or npm install and then run npm run dev?

Cronix's avatar

sometimes it also helps to run "vagrant destroy" followed by "vagrant up --provision" from ~/Homestead when settings get changed. I've had a few times where the vagrant box wasn't being updated properly, even after running "provision" on it.

You might also want to ssh into your homestead VM and check the /etc/nginx/sites-available dir and see if there is a "homestead.app" file there. Then check /etc/nginx/sites-enabled to see if there is a symlink back to the /etc/nginx/sites-available/homestead.app file.

ejdelmonico's avatar

@cronix He should not have to do any of that for a new install. If the install is suspect then removing Homestead and starting over is the only way to resolve. Otherwise, you waste many hours troubleshooting without ever resolving. I have used Homestead for a number of years and it either works or you need to remove it and install again assuming you set it up properly.

_Rich's avatar
Level 1

@ejdelmonico "...waste many hours troubleshooting without ever resolving .. "

Or even days! LOL.

I can nuke Homestead and try again, see what happens! - right now, I feel like I'm a trying to play pinata.

_Rich's avatar
Level 1

@ejdelmonico - that would be really awesome if you have the time! I'm sure it's something minor that is happening, possibly to do with the directory mapping and/or where and in what order I'm doing the setup process..

ejdelmonico's avatar

@_Rich I have some time right now. Should probably take this out of the forum though. Do you use Messages on Mac, Telegram on Mac or something like that?

_Rich's avatar
Level 1

@ejdelmonico - sounds like a good plan, thanks! I'm not on Messages or Telegram - I can install Telegram from the App store though...

Next

Please or to participate in this conversation.