Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid. when i am using ngrok

Tags:

ngrok

When I am using ngrok & run url given by ngrok with following configuration:

  • my local url is : localhost:8080/someexample
  • my ngrok url is : http://f07d0862.ngrok.io/

it show this error:

Bad Request - Invalid Hostname  HTTP Error 400.  
like image 284
Sunny Avatar asked Jun 03 '15 11:06

Sunny


People also ask

What does bad request invalid hostname mean?

When testing the deployment with a single server IP, you get the error “Bad Request (Invalid Hostname)" on your browser. The issue occurs because IWSVA overwrites the Host header in the HTTP request with the IP or FQDN of the web server configured in IWSVA.

How do you tunnel in Ngrok?

Tunnel Authtokens Once you've signed up for an ngrok account, you need to configure ngrok with the authtoken that appears on your dashboard. This will grant you access to all the features of ngrok. ngrok has a simple ngrok config add-authtoken command to make installing the authtoken simple.


1 Answers

Your web server is rejecting the request since it has different hostname.

Try ngrok http -host-header="localhost:8080"

like image 86
Bharat Avatar answered Sep 22 '22 16:09

Bharat