Reputation: 147
I installed laravel homestead on ubuntu 19.04, edited homestead.yaml and got "No input file specified." error. I have an index.php in the code folder. I have tried vagrant reoload --provision, deleting and recreating the vm, vagrant reload --provision, vagrant up --provision and restarting the host machine.
here is a screenshot of the code directory in the homestead vm
Here is my homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: homestead.test
to: /home/vargrant/code
databases:
- homestead
features:
- mariadb: false
- ohmyzsh: false
- webdriver: false
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
here is the terminal output from vagrant reload --provision
==> homestead: Attempting graceful shutdown of VM...
==> homestead: Checking if box 'laravel/homestead' version '8.2.1' is up to date...
==> homestead: Clearing any previously set forwarded ports...
==> homestead: Clearing any previously set network interfaces...
==> homestead: Preparing network interfaces based on configuration...
homestead: Adapter 1: nat
homestead: Adapter 2: hostonly
==> homestead: Forwarding ports...
homestead: 80 (guest) => 8000 (host) (adapter 1)
homestead: 443 (guest) => 44300 (host) (adapter 1)
homestead: 3306 (guest) => 33060 (host) (adapter 1)
homestead: 4040 (guest) => 4040 (host) (adapter 1)
homestead: 5432 (guest) => 54320 (host) (adapter 1)
homestead: 8025 (guest) => 8025 (host) (adapter 1)
homestead: 9600 (guest) => 9600 (host) (adapter 1)
homestead: 27017 (guest) => 27017 (host) (adapter 1)
homestead: 22 (guest) => 2222 (host) (adapter 1)
==> homestead: Running 'pre-boot' VM customizations...
==> homestead: Booting VM...
==> homestead: Waiting for machine to boot. This may take a few minutes...
homestead: SSH address: 127.0.0.1:2222
homestead: SSH username: vagrant
homestead: SSH auth method: private key
==> homestead: Machine booted and ready!
==> homestead: Checking for guest additions in VM...
==> homestead: Setting hostname...
==> homestead: Configuring and enabling network interfaces...
==> homestead: Mounting shared folders...
homestead: /vagrant => /home/username/Homestead
homestead: /home/vagrant/code => /home/username/code
==> homestead: Running provisioner: file...
homestead: /home/username/Homestead/aliases => /tmp/bash_aliases
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: Ignoring feature: mariadb because it is set to false
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: Ignoring feature: ohmyzsh because it is set to false
==> homestead: Running provisioner: shell...
homestead: Running: inline script
homestead: Ignoring feature: webdriver because it is set to false
==> homestead: Running provisioner: shell...
homestead: Running: /tmp/vagrant-shell20191005-11177-c1v2wf.sh
==> homestead: Running provisioner: shell...
homestead: Running: /tmp/vagrant-shell20191005-11177-16wnll5.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Certificate: homestead.test
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Site: homestead.test
==> homestead: Running provisioner: shell...
homestead: Running: inline script
==> homestead: Running provisioner: shell...
homestead: Running: /tmp/vagrant-shell20191005-11177-1nabc4j.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Checking for old Schedule
==> homestead: Running provisioner: shell...
homestead: Running: script: Clear Variables
==> homestead: Running provisioner: shell...
homestead: Running: script: Restarting Cron
==> homestead: Running provisioner: shell...
homestead: Running: script: Restarting Nginx
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating MySQL Database: homestead
==> homestead: Running provisioner: shell...
homestead: Running: script: Creating Postgres Database: homestead
==> homestead: Running provisioner: shell...
homestead: Running: script: Update Composer
homestead: You are already using composer version 1.9.0 (stable channel).
==> homestead: Running provisioner: shell...
homestead: Running: /tmp/vagrant-shell20191005-11177-12xf7dx.sh
==> homestead: Running provisioner: shell...
homestead: Running: script: Update motd
==> homestead: Running provisioner: shell...
homestead: Running: /tmp/vagrant-shell20191005-11177-l17uwr.sh
Upvotes: 1
Views: 1559
Reputation: 344
From the Laravel documentation that can be found here: https://laravel.com/docs/6.x/homestead#adding-additional-sites your path needs to include the public directory like so:
sites:
- map: homestead.test
to: /home/vagrant/project1/public
- map: another.test
to: /home/vagrant/project2/public
Also, I would like to point out a minor spelling error in your current config:
/home/vargrant/code
Best regards
Upvotes: 1