Play laravel with homestead

diewland.eth
1 min readJul 30, 2018

--

This is not final version, I develop and blog together.

download & install first
* https://www.virtualbox.org/wiki/Downloads
* https://www.vagrantup.com/downloads.html
custom default vm folder
* Virtualbox, File -> Preferences -> General -> Default Machine Folder
* Vagrant, set environment path -> VAGRANT_HOME
vagrant box add laravel/homestead
vagrant init laravel/homestead
vagrant up --provider=virtualbox
vagrant commands
vagrant # help
vagrant status # check vm status
vagrant up # start vm
vagrant ssh # shell to vm
vagrant suspend # pause vm
vagrant halt # stop vm
vagrant ssh via putty
* convert the <init-folder>\.vagrant\machines\default\virtualbox\private_key to .ppk using PuTTYGen
* use the .ppk key in your PuTTY session
* connect to vagrant@127.0.0.1:2222
* if something went wrong, use this account
username: vagrant
password: vagrant
vagrant behind proxy
vagrant plugin install vagrant-proxyconf
...modify Vagrantfile...
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://192.168.0.2:3128/"
config.proxy.https = "http://192.168.0.2:3128/"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
# ... other stuff
end
next
* https://laravel-news.com/your-first-laravel-application
------ References ------
* https://laravel.com/docs/5.6/homestead
* https://medium.com/@JohnFoderaro/how-to-set-up-a-local-linux-environment-with-vagrant-163f0ba4da77
* https://stackoverflow.com/a/9924122/466693
* https://github.com/tmatilai/vagrant-proxyconf

--

--

No responses yet