GET /favicon.icon 404 error in ngrok

dreamer picture dreamer · Sep 9, 2015 · Viewed 9.6k times · Source

On running ngrok and going to the suggested url, i get GET /favicon.icon 404 error in ngrok.

In which folder does ngrok search for the favicon.ico file ?

How do i fix this ?

Very new to ngrok. Do help me out

Thanks in advance

Answer

rjb picture rjb · Jan 20, 2017

I ran into a similar problem with URIs from ngrok being served as 404s.

I have a local Apache, PHP and MySQL stack setup on macOS using *.dev domains.

So in my case, I needed to set the host-header option in ngrok to match the hostname of the virtual host Apache was configured for.

Here's the relevant part of my Apache virtual host configuration:

<VirtualHost *:80>
    ServerName example.dev
    ServerAlias www.example.dev
    ...
    UseCanonicalName Off
</VirtualHost>

The necessary ngrok arguments to tunnel requests to my private development domain were:

$ ngrok http example.dev:80 -host-header=example.dev