LoginSignup
2
2

More than 3 years have passed since last update.

外部からHomestead開発環境へアクセスできるようにする

Posted at

Homesteadの開発環境に外部からアクセスしたいなーって思うとき(特に別の仮想環境から)
いろいろと設定めんどくさいなーって。

でもHomesteadすごい!
コマンドポチーですぐに外部からアクセスできるようになる!

とりあえず vagrant ssh で開発環境に入ってから

share homestead.test  // Homestead.yaml内の sitesで設定したmapを指定

こうすると、ngrokが起動して
スクリーンショット 2019-05-29 20.10.22.png

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 )にアクセスする。

ばんざーい

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2