Ngrok 與 docker http server

ngrok

ngrok server

可以將 local 本機 web server 開放出去

command

將 http port 80 曝光出去

./ngrok http 80

預設本機將對應使用

http://localhost:80

而開放出去的 domain 可能為: http://4602eef5.ngrok.io

description

簡單來說,外網使用者可以透過 http://4602eef5.ngrok.io 這個網址

連線進入,個人開發電腦的 http://localhost:80

at docker

如果是 docker 使用者

記得修改 docker nginx(apace) 內的 http://localhost:80 的 config

增加監聽 http://4602eef5.ngrok.io 這個 domain

導向到你想要測試的專案

1個讚

之前我也是用 ngrok,但是它最近都有連線限制,例如 1 分鐘內連線 request 太多服務就會中斷,有點困擾 :roll_eyes: