Awkward problem with Homestead

Published 3 years ago by jkoech

Update: I'm running Ubuntu 14.04 and Homestead 2.0

I've been using homestead for some time now and it's been working well until yesterday: I get a 404 Not Found error when I visit a newly added laravel 5 project.

I've attached my Homestead.yaml & hosts file below and the first 3 projects are working fine, i.e when I visit laravel.app it works perfectly but when I visit learnl5.app I get a 404 error.

I have tried halting, suspending, resuming the homestead box but still it isn't working!

Homestead.yaml file

ip: "192.168.10.10"

memory: 2048

cpus: 1

authorize: /home/{my-user-name}/.ssh/id_rsa.pub

keys:

- /home/{my-user-name}/.ssh/id_rsa

folders:

- map: /home/{my-user-name}/code/safarisasa

  to: /home/vagrant/safarisasa

- map: /home/{my-user-name}/code/laravel

  to: /home/vagrant/laravel

- map: /home/{my-user-name}/code/laravel5

  to: /home/vagrant/laravel5

- map: /home/{my-user-name}/code/learnl5

  to: /home/vagrant/learnl5

sites:

- map: safarisasa.app

  to: /home/vagrant/safarisasa/public

- map: laravel.app

  to: /home/vagrant/laravel/public

- map: laravel5.app

  to: /home/vagrant/laravel5/public

- map: learnl5.app

  to: /home/vagrant/learnl5/public

databases:

- homestead

variables:

- key: APP_ENV

  value: local

Hosts file

192.168.10.10 safarisasa.app

192.168.10.10 learnl5.app

192.168.10.10 laravel.app

192.168.10.10 laravel5.app

Best Answer (As Selected By jkoech)
sitesense

Check your Homestead.yaml file for tabs and replace with spaces. Vagrant can have issues with tabs. Also make sure the indentation is correct. :)

sitesense

Check your Homestead.yaml file for tabs and replace with spaces. Vagrant can have issues with tabs. Also make sure the indentation is correct. :)

bashy
bashy
3 years ago (1,000,470 XP)

You can always check if the virtual host is set by looking in /etc/nginx/sites-enabled (or sites-available to see if the config is there but not enabled).

I learnt the tab/space issue and indentation from working on Minecraft yaml files, that was a pain to figure out what it was.

jkoech

Apparently it's the tab and spaces issue. Thank you, this solved it.

Please sign in or create an account to participate in this conversation.