Windows10でのLaravel Homestead構築方法 まとめ

Hi, this is dog-ears.
今回は、Windows10上でLaravel Homestead 環境構築をする方法について、まとめました。
This time, I summarized how to build Laravel Homestead environment on Windows 10.

■Laravel 5.8 Laravel Homestead (Official)

Ok.Let’s go.

(1) Install virtual box

■virtual box

(2) Install Vagrant


(3) Create project folder at local. And Open command Prompt. move to project folder

I will talk project folder as [project folder].

(4) Create box file
vagrant box add laravel/homestead

There is one question, and I answered “virtualbox".

(5) Clone Git repository
git clone Homestead
cd Homestead

At this point, the directory structure is as follows.
[project folder]
– Homestead

(6) Initialize& edit Homestead.yaml



next, create two folder.
code folder to place code,and .ssh folder to place ssh keys as follows.

[project folder]
– .ssh
– code
– Homestead

last, edit Homestead.yaml

- map: C:\[fullpath to project folder]\code
to: /home/vagrant/code

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

There are two point.

write [full-path to project folder] at folders map.
(default [~/code] show some errors in my case )

At sites-map, It is recommended to use default 'homestead.test’.
Some other homepage use “".
but “" is used and make something wrong.

(7) Edit host file

C:\Windows\System32\drivers\etc\hosts homestead.test
(8) Create SSH Keys

move to .ssh folder. And execute follow.

ssh-keygen -t rsa

are created.

(9) Start vagrant
vagrant up
(10) login with ssh
vagrant ssh

Everything is done.
After that,Install laravel as follows

sudo composer self-update
composer create-project laravel/laravel code --prefer-dist

and You can see your page in follow address.


But, If you run laravel dusk (Browser test), Some errors are occured.

About the dusk environment construction, I will summarize in the next article.
Thank you.


Posted by dog-ears