Support the ongoing development of Laravel.io →
Configuration
Last updated 1 month ago.
0

Dear all

Same issue here. As far as I can tell, the nginx config is correct – but the result proves otherwise.

Any ideas?

Thanks for your support Mellou

Last updated 1 month ago.
0

Having the same issue... homestead/vagrant set up the VM just fine after working out some minor local bugs, and now the server just shows the same message.

Edit: I can verify that my shared files were pulled into the VM.

Last updated 1 month ago.
0

Update - hopefully everyone was already able to fix theirs, but I just solved mine as well. It was just a small problem in my homestead.yaml. Since nginx is configured on vagrant up, the sites "to" has to point exactly to where you shared your local directory to in the folders section.

Last updated 1 month ago.
0

justingospo said:

Update - hopefully everyone was already able to fix theirs, but I just solved mine as well. It was just a small problem in my homestead.yaml. Since nginx is configured on vagrant up, the sites "to" has to point exactly to where you shared your local directory to in the folders section.

I am having the same trouble, and tried modifying my Homestead.yaml file as @justingospro mentioned, but am still not having any luck. Not sure if I understood the solution? My Homestead.yaml file is like the following: folders: -map: /Users/me/code/exampleproject -to: /home/vagrant/code/exampleproject sites: -map: exampleproject.app -to: /home/vagrant/code/exampleproject/public

I tried removing the public to make the two identical, but that didn't solve it. Not sure what else to do?

Any help would be appreciated!!

Last updated 1 month ago.
0

I hope everyone has made this work. There seems to be a slight misunderstanding on this thread about how Homestead works. When you set up the folder that is to be shared with Vagrant, that is just the base folder for all projects on the Homestead vagrant machine. The first time you set it up, no folders exist inside of the Code folder because you haven't created any new projects yet. This configuration allows you to have multiple projects mapped to the same vagrant machine and have them use the same folder structure as before.

Here is the sites entry from the default yaml file.

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

So, the sites entry says that it is supposed to map homestead.app to /home/vagrant/Code/Laravel/public. The problem is that the folder/project Laravel doesn't exists in the Code folder on either vagrant or host machine. If you set it up exactly like the yaml file says and then install a new laravel project in the folder Laravel on either the host or vagrant machine, it will work.

If you want to use composer on the vagrant machine you can just ssh into the vagrant machine by typing vagrant ssh into your terminal or command shell. Once there, navigate to the base folder that you setup in the folders entry and use composer to create a new laravel project.

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

This command inside the Code folder on the vagrant machine will install laravel into the correct folder for the default configuration to work.

If you have composer already installed on your local machine, you can just go to the folder that you mapped to /home/vagrant/Code and run the composer command from above.

Below is my current yaml file on my Windows 8 machine.

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: /Users/{user_folder}/.ssh/id_rsa.pub

keys:
    - /Users/{user_folder}/.ssh/id_rsa

folders:
    - map: /Sites/Laravel # Maps to C:\Sites\Laravel
      to: /home/vagrant/Code

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

variables:
    - key: APP_ENV
      value: local
Last updated 1 month ago.
0

If you just want to see if ngenx is running on the homestead box before you run composer, you can put a file index.html at /home/vagrant/Code/Laravel/public/ and put "hello from my homestead site" in the file. Then when you navigate to http://homestead.app:8000/ you should see that line in your browser. You'll want to remove the Laravel directory before you run composer or you'll get a "not empty" warning.

Also, you'll need to sudo the composer self-update call since you're updating a file in /usr/local/bin.

Last updated 1 month ago.
0

Quick Tip: The VM behaves differrently when started from the VirtualBox GUI. To avoid the "no input file specified" error alway use vagrant up to start your VM

Last updated 1 month ago.
0

My "no input file specified" issue was solved by making my application's storage file folder fully accessible instead of read only as directed by the installation documentation as shown below:

Permissions

After installing Laravel, you may need to grant the web server write permissions to the app/storage directories. See the Installation documentation for more details on configuration.

Last updated 1 month ago.
0

I would check your /etc/ngnx/sites-available/domain. Does your server.root match your homestead.yaml config? I found that vagrant reload did not update this for me. You might just do a vagrant destroy/up. OR go in and edit the site within the VM.

Last updated 1 month ago.
0

I had this tonight and my solution was to vagrant halt and vagrant up again and let the process complete fully.

The first time I interrupted the boot with ctrl+c and it didn't complete correctly. When I tried vagrant up from the interrupted state it said it said the machine was running and do anything more.

It was in this state that the No input file specified issue was encountered.

By halting the machine and restarting it properly the error went away. The solution was to be patient to get past the:

    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
    default: Error: Remote connection disconnect. Retrying...
Last updated 1 month ago.
0

The configuration sample offer by @jahumes worked on my case but I had to do a vagrant provision to reload the VM

vagrant provision
Last updated 1 month ago.
3

Thanks gafitescu, worked for me!

Last updated 1 month ago.
1

I also wanted to point out that YAML is very picky on spaces vs tabs. If your Homestead.yaml file is not properly formatted it can cause issues as well.

Last updated 1 month ago.
0

Also make sure you edit your hosts file, like on mac it would look something like:

sudo nano /private/etc/hosts

vagrant reload --provision is also a good one to save as an alias.

Last updated 1 month ago.
0

The "No input file specified" error means that the web server has not been able to find the index.php file that will kickstart the larval app. This is usually because we haven't mapped the folders properly in the HOMESTEAD.YAML configuration file and should be relatively easy to fix. Or so I thought.

My homestead box was on version 0.1.9 and I ran 'vagrant box update" to load the latest homestead box. Seemed to work fine.

I was trying to create a new laravel project to see what laravel 5 was like (followed instructions from laracasts.com). So I edited my "homestead.yaml" file to create the new project directories etc. The problem here is that just as johnTurknett pointed out above the "homestead.yaml" file doesn't deal with tabs very well. In fact any tabs will "break" the yaml file and although "vagrant up" will appear to work and provide no errors, internally the script failed, or at least did not complete ALL its tasks..

Solution here is to remove all the tab characters from the "homestead.yaml" file. I'm not sure but I suspect there may also be EOL issue here between windows EOL and unix EOL. The YAML file appears to need unix EOL characters to work properly. As I said I'm not 100% sure about this.

Moving on. I edited my "homestead.yaml" and removed all the tabs character, replacing them with spaces.

"Vagrant up" and again all seemed fine, however, there was not a new config file in the "/etc/nginx/sites-enabled" folder of the VM as I expected.

Istables (above) suggested doing "vagrant reload --provision" to rebuild the VM and this is what I did. It worked and the VM now had a new configuration file in the "/etc/nginx/sites-enabled" folder of the VM. so it looks like you will have to run a "vagrant reload --provision" AFTER you have edited and/or updated your homestead.yaml file to make sure the changes are reflected in the new VM.

This where I get the "No input file specified" error message.

The issue, for me, was that on a Laravel 4,2 installation the index.php file that the web server initially loads is located on the VM in "/home/vagrant/{project name}/laravel/public" but in a Laravel 5 installation it seems this folder is installed in "/home/vagrant/{project name}/public" so the extra level of folder "laravel' is now not needed.

Once the sites section of the homestead.yaml file was edited to point to the correct folder on the VM then all should now work.

"vagrant up" and there is still a "No input file specified" error.

However if you do "vagrant reload --provision" all will work fine.

In Summary :-

Use "vagrant reload --provision" after any change to the homestead.yaml file to rebuild the VM

"No input file specified" means you need to check the folder mappings in the homestead.yaml file

Hope this helps someone.

Last updated 1 month ago.
0

I had to change the permissions of the app/storage folder via Windows explorer.

I tried doing it using chmod via the command line via ssh to homestead. That did not work.

Then, within Windows I right-clicked on it, and I gave my Windows user permissions over the folder and that worked.

Last updated 1 month ago.
0

I was playing around with the directory paths in homestead.yaml and had to do vagrant destroy/up in order to get those changes reflected in the VM. After that it worked.

0

jahumes said:

I hope everyone has made this work. There seems to be a slight misunderstanding on this thread about how Homestead works. When you set up the folder that is to be shared with Vagrant, that is just the base folder for all projects on the Homestead vagrant machine. The first time you set it up, no folders exist inside of the Code folder because you haven't created any new projects yet. This configuration allows you to have multiple projects mapped to the same vagrant machine and have them use the same folder structure as before.

Here is the sites entry from the default yaml file.

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

So, the sites entry says that it is supposed to map homestead.app to /home/vagrant/Code/Laravel/public. The problem is that the folder/project Laravel doesn't exists in the Code folder on either vagrant or host machine. If you set it up exactly like the yaml file says and then install a new laravel project in the folder Laravel on either the host or vagrant machine, it will work.

If you want to use composer on the vagrant machine you can just ssh into the vagrant machine by typing vagrant ssh into your terminal or command shell. Once there, navigate to the base folder that you setup in the folders entry and use composer to create a new laravel project.

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

This command inside the Code folder on the vagrant machine will install laravel into the correct folder for the default configuration to work.

If you have composer already installed on your local machine, you can just go to the folder that you mapped to /home/vagrant/Code and run the composer command from above.

Below is my current yaml file on my Windows 8 machine.

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: /Users/{user_folder}/.ssh/id_rsa.pub

keys:
   - /Users/{user_folder}/.ssh/id_rsa

folders:
   - map: /Sites/Laravel # Maps to C:\Sites\Laravel
     to: /home/vagrant/Code

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

variables:
   - key: APP_ENV
     value: local
~~~>**jahumes** said:

I hope everyone has made this work. There seems to be a slight misunderstanding on this thread about how Homestead works. When you set up the folder that is to be shared with Vagrant, that is just the base folder for all projects on the Homestead vagrant machine. The first time you set it up, no folders exist inside of the Code folder because you haven't created any new projects yet. This configuration allows you to have multiple projects mapped to the same vagrant machine and have them use the same folder structure as before.

Here is the sites entry from the default yaml file.

sites:

So, the sites entry says that it is supposed to map **homestead.app** to **/home/vagrant/Code/Laravel/public**. The problem is that the folder/project Laravel doesn't exists in the Code folder on either vagrant or host machine. If you set it up exactly like the yaml file says and then install a new laravel project in the folder Laravel on either the host or vagrant machine, it will work.

If you want to use composer on the vagrant machine you can just ssh into the vagrant machine by typing **vagrant ssh** into your terminal or command shell. Once there, navigate to the base folder that you setup in the folders entry and use composer to create a new laravel project.

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

This command inside the Code folder on the vagrant machine will install laravel into the correct folder for the default configuration to work.

If you have composer already installed on your local machine, you can just go to the folder that you mapped to **/home/vagrant/Code** and run the composer command from above.

Below is my current yaml file on my Windows 8 machine.

ip: "192.168.10.10" memory: 2048 cpus: 1

authorize: /Users/{user_folder}/.ssh/id_rsa.pub

keys:

  • /Users/{user_folder}/.ssh/id_rsa

folders:

  • map: /Sites/Laravel # Maps to C:\Sites\Laravel to: /home/vagrant/Code

sites:

  • map: laravel.app to: /home/vagrant/Code/Laravel/public

variables:

  • key: APP_ENV value: local

I hope everyone has made this work. There seems to be a slight misunderstanding on this thread about how Homestead works. When you set up the folder that is to be shared with Vagrant, that is just the base folder for all projects on the Homestead vagrant machine. The first time you set it up, no folders exist inside of the Code folder because you haven't created any new projects yet. This configuration allows you to have multiple projects mapped to the same vagrant machine and have them use the same folder structure as before.

Here is the sites entry from the default yaml file.

sites:

So, the sites entry says that it is supposed to map **homestead.app** to **/home/vagrant/Code/Laravel/public**. The problem is that the folder/project Laravel doesn't exists in the Code folder on either vagrant or host machine. If you set it up exactly like the yaml file says and then install a new laravel project in the folder Laravel on either the host or vagrant machine, it will work.

If you want to use composer on the vagrant machine you can just ssh into the vagrant machine by typing **vagrant ssh** into your terminal or command shell. Once there, navigate to the base folder that you setup in the folders entry and use composer to create a new laravel project.

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

This command inside the Code folder on the vagrant machine will install laravel into the correct folder for the default configuration to work.

If you have composer already installed on your local machine, you can just go to the folder that you mapped to **/home/vagrant/Code** and run the composer command from above.

Below is my current yaml file on my Windows 8 machine.

ip: "192.168.10.10" memory: 2048 cpus: 1

authorize: /Users/{user_folder}/.ssh/id_rsa.pub

keys:

  • /Users/{user_folder}/.ssh/id_rsa

folders:

  • map: /Sites/Laravel # Maps to C:\Sites\Laravel to: /home/vagrant/Code

sites:

  • map: laravel.app to: /home/vagrant/Code/Laravel/public

variables:

  • key: APP_ENV value: local
0

Hi Everyone.

I had the same problem and resolved it by matching the exact file path on the shared folder. it was a matter of removing the "vagrant" from the sites folder path.

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

instead of :

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

I'm on mac os x 10.10 and here is my working homestead.yaml file:


---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Code
      to: /home/vagrant/code

sites:
    - map: homestead.app
      to: /home/code/laravel1/public

    - map: lapp.app
      to: /home/code/lapp/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local


Hope it helps anyone out there. I nearly went mad about this.

0

OK, this was driving me mad for about 3 hours and I almost missed the right reply above that fixed it for me.

It was by @srhyne so a big thank you to him.

Ok, this is what was happening for me.

I had edited my Homestead.yaml file after I had already done "homestead up"

BUT the issue is that when you edit the Homestead.yaml file the changes are not reflected in the /etc/nginx/sites-available/ dir.

If you look in that directory you see a file that matches the mywebsite.app you specify in Homestead.yaml.

When I edited that file I saw the problem.

The changes I made had not been updated to this file.

So the answer is really easy.

homestead destroy

homestead up

And BOOM!!!!!

0

I had the same exact problem and found the solution through the use of larachat.

Here's how to fix it you need to have your homestead.yaml file settings correct. If you want to know how its done follow Jeffery Way tutorial on homestead 2.0 https://laracasts.com/lessons/say-hello-to-laravel-homestead-two.

Now to fix "Input not specified" issue you need to ssh into homestead box and type

"serve domain.app /home/vagrant/Code/path/to/public/directory" this will generate a serve script for nginx. You will need to do this everytime you switch projects

0

This is an awesome solution~~~~~~!!!

andyscraven said:

So the answer is really easy.

homestead destroy

homestead up

And BOOM!!!!!

0

Thank you RudyJessop - perfect and simple!

RudyJessop said:

I had the same exact problem and found the solution through the use of larachat.

Here's how to fix it you need to have your homestead.yaml file settings correct. If you want to know how its done follow Jeffery Way tutorial on homestead 2.0 https://laracasts.com/lessons/say-hello-to-laravel-homestead-two.

Now to fix "Input not specified" issue you need to ssh into homestead box and type

"serve domain.app /home/vagrant/Code/path/to/public/directory" this will generate a serve script for nginx. You will need to do this everytime you switch projects

0

Thanks. This fixed it for me.

I had a typo in my Homestead.yaml

andyscraven said:

OK, this was driving me mad for about 3 hours and I almost missed the right reply above that fixed it for me.

It was by @srhyne so a big thank you to him.

Ok, this is what was happening for me.

I had edited my Homestead.yaml file after I had already done "homestead up"

BUT the issue is that when you edit the Homestead.yaml file the changes are not reflected in the /etc/nginx/sites-available/ dir.

If you look in that directory you see a file that matches the mywebsite.app you specify in Homestead.yaml.

When I edited that file I saw the problem.

The changes I made had not been updated to this file.

So the answer is really easy.

homestead destroy

homestead up

And BOOM!!!!!

0

@jahumes suggestion was PERFECT!

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

in /home/vagrant/Code on the vagrant vm

Last updated 7 years ago.
0

I had a problem where the etc/nginx/sites-availables would not update basically - so if you have problems with the provision check that. I manually edited the files to point to the correct folder and it did the trick !

0

I had the same problem, and thanks to @ghkdev i figured out how to fix it

This was my case:

I have this in my homestead.yaml:

sites:
    - map: mysite.com
      to: /Users/jorge/Projects/mysite/public

My error was that the 'public' folder in the path '/Users/jorge/Projects/mysite/public' did not exist and to solve this i just re-create 'public' folder ( this folder was just a soft link to public_html folder) and that solved my problem.

PD. Remember to run homestead provision or vagrant provision if you think to edit the homestead.yaml because that is the way to refresh and update the homestead to take the changes.

Last updated 6 years ago.
0

My solution was very simple: reprovision the box with "vagrant provision" I was bummed that i couldn't figure out what the exact problem was, but at least the solution was simple

0

I was sure everything was correct.

what solved it for me: homestead up --provision

0

I am not able to install homestead globally, I run into a big error with symfony dependencies. I may post that one.

I installed the homestead resource in my vendors bin folder, got my Homestead file, I still have an error. I did the vagrant halt, vagrant up stuff, checked my configs, I still get this issue. with "No input file specified"

Looks like an nginx issue, I am browsing to something!

Installing homestead VM on VagrantBox on Ubuntu 14.04.

0

After changing your Homestead.yaml file, remember to run: homestead provision

It should pick up any changes to your Homestead.yaml

No need to destroy the VM.

Last updated 6 years ago.
0

Thanks @njames>njames said:

I had this tonight and my solution was to vagrant halt and vagrant up again and let the process complete fully.

The first time I interrupted the boot with ctrl+c and it didn't complete correctly. When I tried vagrant up from the interrupted state it said it said the machine was running and do anything more.

It was in this state that the No input file specified issue was encountered.

By halting the machine and restarting it properly the error went away. The solution was to be patient to get past the:

   default: Error: Remote connection disconnect. Retrying...
   default: Error: Remote connection disconnect. Retrying...
   default: Error: Remote connection disconnect. Retrying...
0

I am having the same no input file specified error. I am able, from my local computer, to cd to ~/Code no problem which holds my laravel created Fellowship folder. I am also able to ssh into vagrant and view the fellowship folder by copy and pasting my ~/home/vagrant/Code/Fellowship/public direcctory. I have spent nearly 20 hours trying to figure this out


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: fellowship.dev
  to: ~/home/vagrant/Code/Fellowship/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp
Last updated 6 years ago.
1

From my virtual machine I ran

serve fellowship.dev /home/vagrant/Code/Fellowship/public

This fixed my issue.

But now every time I boot my VM I have to ssh in and run this command. How can I fix this permanently?

Last updated 6 years ago.
0

I lost 2 hours. I deleted all capitals in my paths (sites/folders) and everything works. I am a Windows user.

Last updated 6 years ago.
0

Hi everyone, just wanted to note that I also had this problem, but I noticed that when I ran "vagrant up", I was getting the following output: ==> default: Machine already provisioned. Run vagrant provision or use the --provision ==> default: flag to force provisioning. Provisioners marked to run always will still run.

So, I successfully solved the problem by running the command: "vagrant provision"

0

@ghkdev's answer helped me, thanks! It's all about the .yaml file and correct path

0

it's maybe worth doing a recap

  1. if you edit your Homestead.yaml file, in particular adding or modifying sites to a vagrant halt, vagrant destroy, vagrant up to save your configurations.

  2. if you are still having problems then vagrant ssh to the Homestead box, and make sure that /home/vagrant/Code/etc/etc exists (etc = whatever folders and files you expect to be there)

  3. whilst still in the Homestead box, do a ls /etc/nginx/sites-enabled and make sure there is an entry for each app, e.g. homestead.app that is in your Homestead.yaml file

  4. you can manually add a command to serve other apps, but as you have to run them each time it is better to fix using the above.

0

Also worth to notice that if you're trying to test the response of the virtual machine with some 'Hello world' index file, the type of the site has to be apache, not laravel (as default). If it's not set, the 'no input file specified' error will happen. For example:

sites:
    - map: some.app
      to: /home/vagrant/Code/some/public
      type: apache
0

Ok, for me changing the following

folders:
    - map: c:/www/one
      to: /home/vagrant/code

sites:
    - map: homestead.test
      to: /home/vagrant/code/public

to this:

folders:
    - map: ~/code
      to: /home/vagrant/code

sites:
    - map: homestead.test
      to: /home/vagrant/code

And placing the index.php with

<?php
echo "hello world";

to C:\Users\YourUsername\code has solved the problem!

So basically, both "to:" paths have to be identical

Good luck :)

Last updated 3 years ago.
0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.