栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

ngrok 免费,本地项目,域名

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ngrok 免费,本地项目,域名

方式一:使用ngrok免费https域名,访问本地,服务器的项目 1.注册登录

ngrok官网地址

2.下载安装自己系统对应的版本

3.配置自己的token

文件安装解压后,配置自己的token:

ngrok config add-authtoken 28nHyzzzzzzsUgfZ8fPkU9CLYq_6RuJroE000000(自己的token)
4.启动ngrok服务
ngrok http <你需要开发的端口号>

5.访问测试

访问ngrok提供的域名:红框域名即可

方式二:使用ngrok镜像 操作如下:

Run an ngrok agent pointed at localhost:80

docker run --net=host -it ngrok/ngrok http 80

Access the web inspector on the host machine at localhost:3000

docker run -it --p 3000:4040 ngrok/ngrok http 80

Run the ngrok agent with auth token ‘xyz’

docker run -it -e NGROK_AUTHTOKEN=xyz ngrok/ngrok:alpine http 80

Run the ngrok agent with the config file ‘./ngrok.yml’ from the host machine

docker run -it -v $(pwd)/ngrok.yml:/etc/ngrok.yml -e NGROK_CONFIG=/etc/ngrok.yml ngrok/ngrok:alpine http 80
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/963366.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号