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,
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.
If you just with to use ngrok to intercept incoming data, and you do not have a local webserver for whatever reason, then you can use ncat.
nc -l 5000
This will create a process that listens on port 80.
So when used in combination with
ngrok http 5000
You will no longer get the '502 bad gateway' error.
I had to put my server ip address and works perfect!
./ngrok http [ip server]:5000
Step 1 - Register to ngrok and download .exe file in dashboard page
Step 2 - Open terminal and copy & paste from the dashboard the line without ./
Step 3 - run your localhost
Step 4 - If step 2 was successfully done, paste in the same terminal (step 2) the line with your localhost port
ngrok http https://localhost:44386 -host-header="localhost:44386"
Step 5 - Copy the URL generated in the terminal and waalla.. you can ping to it.
In case of <<<<Ngrok errors '502 bad gateway'>>>> change https into http so the Step 4 will be ngrok http http://localhost:44386 -host-header="localhost:44386"
It seems that this issue has now been resolved in the latest version of ngrok: https://github.com/inconshreveable/ngrok/issues/448
Basically, what you do is to specify that you are using https like this:
ngrok http https://localhost:54321 -host-header="localhost:54321"
At least, this resolved the issue for me. Replace 54321 with your actual port number.
502 gateway error occurs because ngrok not able to receive any reponse from Localhost.
The things need to be done is :
What I have done is
It works really cool ...
Try this .....
Hope it works for You .