php - Laravel Homestead - site cant be reached. Windows 10

Im getting started with Laravel Homestead and spend half a day working with tutorials and manuals. The problem is that everything looks perfect - without any errors, but still I cant see laravel welcom page.

I've installed vagrant and virtual box.

at c:/windows/system32/drivers/etc/hosts added line like:

{-code-1}

My directory tree looks like:

{-code-2}

I made .ssh keys and using git bash:

{-code-3}

and configured homestead.yaml file:

{-code-4}

Everything looks fine to me so far, is it?

Next in shell:

{-code-5}

successfully logged to laravel and changed directory to only one existing code, then:

laravel new homestead

Finished iwth message Application ready! Build something amazing.

Did also another one project with different names, but when I type in my chrome browser homestead.test or whatever I call my project -> This site can't be reached.

Thanks for your help.

Answer

Solution:

It sounds like you made the vagrant box first then created a new app after ssh into the vagrant box. I usually take different steps.

  1. Make sure vagrant is installed. https://www.vagrantup.com/downloads.html
  2. Make sure the laravel/homested box has been added to vagrant vagrant box add laravel/homestead
  3. Make sure homestead is installed on the home directory in a file named Homestead git clone https://github.com/laravel/homestead.git ~/Homestead https://laravel.com/docs/7.x/homestead#first-steps
  4. install homestead into your project composer require laravel/homestead --dev
  5. use the make command to generate the vagrant and homestead.yaml files (for windows vendor\\bin\\homestead make) https://laravel.com/docs/7.x/homestead#per-project-installation
  6. Configure the vagrant, homestead.yaml, and hosts file as you have done.
  7. vagrant up

Source