Reputation: 1175
I'm hosting a Python http server from a simple HTML folder on my laptop using py -m http.server
. It works fine on the browser end, (tested from computers on my LAN) but the output often says
::ffff:192.168.1.212 - - [19/Dec/2021 21:58:38] code 404, message File not found
what's with that? (obviously the date/time and local IP are often different, just pasting full line for clarification)
Upvotes: -1
Views: 6451
Reputation: 339
Right after the error message you given, there should be another one indicating which file the browser is requesting:
$ python3 -m http.server
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
::1 - - [20/Dec/2021 00:59:02] "GET / HTTP/1.1" 200 -
::1 - - [20/Dec/2021 00:59:02] code 404, message File not found
::1 - - [20/Dec/2021 00:59:02] "GET /favicon.ico HTTP/1.1" 404 -
In the above example the browser is requesting /favicon.ico
, which is not found.
Upvotes: 1