本文介绍了如何更改ngrok的Web界面端口地址(而不是4040)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ngrok很棒的 Web界面默认指向http://127.0.0.1:4040.但是,我还有其他应用程序在该端口上侦听,并且需要对其进行更改,以便ngrok侦听例如http://127.0.0.1:4045.

ngrok's awesome web interface is pointed to http://127.0.0.1:4040 by default. I have other applications listening on that port, however, and need to change it so that ngrok listens on, say, http://127.0.0.1:4045.

推荐答案

在ngrok正在寻找其config.yml noreferrer>平台上的默认配置.如果目录不存在,请建立目录(在Windows上,通过输入.ngrok2.作为文件夹名称来完成此操作).

Create a config.yml wherever ngrok is looking for its default config on your platform. If the directory doesn't exist, make it (on windows this is done by entering .ngrok2. as the folder name).

Linux /home/example/.ngrok2/ngrok.yml

Linux /home/example/.ngrok2/ngrok.yml

Windows C:\ Users \ example \ .ngrok2 \ ngrok.yml

Windows C:\Users\example\.ngrok2\ngrok.yml

然后,在config.yml中输入

web_addr: 4045

例如,由于此文件位于ngrok的默认配置目录中,因此可从命令行运行ngrok http 1337,现在它将运行ngrok侦听服务器的端口1337,并在http://127.0.0.1:4045

Since this file is in ngrok's default config directory running ngrok http 1337 from the command line, for example, will now run ngrok listening to your server at port 1337 and serving its web interface on http://127.0.0.1:4045

这篇关于如何更改ngrok的Web界面端口地址(而不是4040)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 13:20