Ngrok 错误“502 错误网关" [英] Ngrok errors '502 bad gateway'

查看:43
本文介绍了Ngrok 错误“502 错误网关"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对使用任何类型的 Web 应用程序的东西都很陌生,我一直在尝试慢慢构建 Facebook Messenger Bot.当我尝试使用 ngrok 时,我无法访问给定的地址,即:

Quite new to using any sort of Web App stuff, and I've been trying to slowly build a Facebook Messenger Bot. When I try to use ngrok I can't visit the address I'm given, i.e:

ngrok http 5000

是我在命令行中输入的内容,它返回的是:

is what I'm putting in the command line, and it's returning this:

ngrok by @inconshreveable

Session Status                online
Version                       2.1.18
Region                        United States (us)
Web Interface                 http://127.0.0.1:4040
Forwarding                    http://ea986ca5.ngrok.io -> localhost:5000
Forwarding                    https://ea986ca5.ngrok.io -> localhost:5000

Connections                   ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00

但是当我按照要求使用地址https://ea986ca5.ngrok.io"时Facebook 开发者页面,上面写着:

But when I take the address 'https://ea986ca5.ngrok.io' as is required by the Facebook developer's page, it says:

The connection to http://ea986ca5.ngrok.io was successfully tunneled to your
ngrok client, but the client failed to establish a connection to the local  
address localhost:5000.


Make sure that a web service is running on localhost:5000 and that it is a 
valid address.


The error encountered was: dial tcp [::1]:5000: connectex: No connection 
could be made because the target machine actively refused it.

是我本地端口的问题吗?谢谢!

Is it a problem with my local port? Thanks!

推荐答案

这对我有用

ngrok.exe http -host-header=rewrite localhost:<Your Port number>

例如:

ngrok.exe http -host-header=rewrite localhost:5219

我用的是visual studio 2017,不知道有没有效果.

Im using visual studio 2017 dont know if it effects anthing.

这篇关于Ngrok 错误“502 错误网关"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆