Homesteadの開発環境に外部からアクセスしたいなーって思うとき(特に別の仮想環境から)
いろいろと設定めんどくさいなーって。
でもHomesteadすごい!
コマンドポチーですぐに外部からアクセスできるようになる!
とりあえず vagrant ssh で開発環境に入ってから
share homestead.test // Homestead.yaml内の sitesで設定したmapを指定
ngrok by @inconshreveable
(Ctrl+C to quit)
Session Status online
Session Expires 7 hours, 57 minutes
Update update available (version 2.3.29, Ctrl-U to update)
Version 2.2.8
Region United States (us)
Web Interface http://192.168.10.57:4040
Forwarding http://6ff770f8.ngrok.io -> localhost:80
Forwarding https://6ff770f8.ngrok.io -> localhost:80
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
こんなのがでてくる。
そしたら Forwarding されているURL(この場合は http://6ff770f8.ngrok.io )にアクセスする。
ばんざーい