【Mac】ローカルホストに、一時的に外部からアクセス出来るようにする
ngrokアカウント作成
Setup&Installation
ngrokをダウンロード
1. Unzip to install
ダブルクリックで解凍してから、二本指クリック(control+クリック)から「開く」を選択
or
Macターミナル
unzip /path/to/ngrok.zip
2. Connect your account
アカウントに接続
Macターミナル
./ngrok authtoken {Your Authtoken}
AuthenticationタブのYour Authtokenでも確認出来る
3. Fire it up
ローカルに外部から接続出来るhttpとhttpsのURLを発行
Macターミナル
# Dockerとかで80番ポートを使用している場合(http://localhostに繋ぎたい場合)
./ngrok http 80
# MAMPで8888番ポートを使用してる場合(http://localhost:8888に繋ぎたい場合)
./ngrok http 8888
結果
Forwarding http://xxxxxxxxxxxx.ngrok.io -> http://localhost:80
Forwarding https://xxxxxxxxxxxx.ngrok.io -> http://localhost:80
http://xxxxxxxxxxxx.ngrok.io
or
https://xxxxxxxxxxxx.ngrok.io
にアクセスするとローカルホストに接続される
Author And Source
この問題について(【Mac】ローカルホストに、一時的に外部からアクセス出来るようにする), 我々は、より多くの情報をここで見つけました https://qiita.com/kj14/items/2572e17ee4e3a11d3ffd著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .