Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GET /favicon.icon 404 error in ngrok

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

like image 905
dreamer Avatar asked Sep 09 '15 09:09

dreamer


People also ask

Why is Ngrok not working?

When an Ngrok connection reaches this length it stops working, and the only way to restore it is by stopping and restarting the ngrok command, which causes a new randomly generated URL to be used. You can always check the Ngrok output to see when a connection is due to expire.


2 Answers

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

like image 167
rjb Avatar answered Sep 16 '22 14:09

rjb


What ngrok do is,make tunnels to localhost.That allows you tunnel requests from Internet to your local machine.

You can see following details after running : ngrok http 8888

Tunnel Status

online                                            
Version                       2.0.19/2.0.19                                     
Web Interface                 http://127.0.0.1:4040 
Forwarding                    http://299954c1.ngrok.io -> localhost:8888

Now all the data intended for 'http://299954c1.ngrok.io' url which is publically accessible will come to your local machine at port 8888

You need to have some server running on your local machine at port 8888 which can serve 'favicon.icon' static file

If you are able to get icon by hitting : localhost:8888/favicon.icon in your browser, You will surely get it from http://299954c1.ngrok.io/favicon.icon

like image 40
Piyush Sagar Avatar answered Sep 16 '22 14:09

Piyush Sagar