How to change ngrok's web interface port address (not 4040)?

半城伤御伤魂 提交于 2019-12-10 14:43:21

问题


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.


回答1:


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).

OS X /Users/example/.ngrok2/ngrok.yml

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

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

Then, in config.yml enter

web_addr: 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



来源:https://stackoverflow.com/questions/36018375/how-to-change-ngroks-web-interface-port-address-not-4040

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!