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

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

问题描述

使用任何类型的Web App的东西都很新,我一直在尝试慢慢构建一个Facebook Messenger Bot。当我尝试使用ngrok时,我无法访问我给出的地址,即:

  ngrok http 5000 

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

  ngrok by @inconshreveable 

会话状态在线
版本2.1.18
地区美国(us)
Web界面http://127.0.0.1:4040
转发http://ea986ca5.ngrok.io - > localhost:5000
转发https://ea986ca5.ngrok.io - > localhost:5000

连接ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00

但当我将地址' https://ea986ca5.ngrok.io '作为Facebook开发人员的页面要求:

 与http://ea986ca5.ngrok.io的连接已成功通过隧道连接到您的
ngrok客户端,但客户端未能建立到本地
地址localhost:5000的连接。


确保webhost服务在localhost:5000上运行,并且它是一个
的有效地址。


遇到的错误是:拨打tcp [:: 1]:5000:connectex:没有连接
因为目标机器主动拒绝了它。

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

解决方案

这对我有用



ngrok.exe http -host-header =重写localhost:



例如ngrok.exe http -host-header =重写localhost:5219



<我正在使用visual studio 2017,不知道它是否会影响anthing。


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

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!

解决方案

This worked for me

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

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

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

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

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