I have just installed ngrok on my local machine, ran
ngrok http 80
as usual.
However when I try to access port 80
localhost:80
I get this error message
The connection to http://*******.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
I am really unsure why this is occurring, and browsed around stackoverflow, but did not quite understand the answers I read. Hoping to diagnose afresh and build understanding from here.
OS is Mac OS.
Can I change the port on the ngrok domain? ngrok does not allow users to change the public ports on any reserved Domain or TCP Address. HTTPS and TLS tunnels will use port 443, and TCP tunnels will use the port assigned to you when the tunnel is created.
Tunnel ngrok to localhostOpen a terminal window and navigate to your myapp directory. Run npm start to start the app. By default, Express generator apps start the server on localhost:3000. If you want to change the port, it's defined in the app's bin/www file on line 15, but we'll leave it on port 3000 for now.
ngrok's TCP tunnels are perfect for SSH traffic. Simply start a TCP tunnel to port 22 and you should be all set.
ngrok enables us to connect with http://xxx.ngrok.io with local server. Yup, all you do is just running server such as Apache, nginx or something. It is allowed build-in local server in your language.
sudo apachectl start
ngrok http 80
If you love PHP, you can follow below.
php -S localhost:8080
ngrok http 8080
Good Luck :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With