Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use ngrok with https://localhost:[port]

I'm doing a simple exercises on Web App Install Banner on C# / .NET / MVC which requires https. When I try to test it by using ngrok as hosting services, the website loads for a while and then I received a 502 bad gateway error.

I normally run my ngrok with this command ngrok http -host-header="localhost:44315" 44315.

I'm pretty new to all this programming and web stuffs. So please guide me in the right way. Thanks

like image 356
azriebakri Avatar asked Aug 09 '26 02:08

azriebakri


1 Answers

You can configure ngrok to forward to a local HTTPS server by specifying the https:// scheme.

ngrok http -host-header="localhost:44315" https://localhost:44315

Docs here: https://ngrok.com/docs#http-local-https

like image 91
user2738058 Avatar answered Aug 10 '26 19:08

user2738058



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!