python -m SimpleHTTPServer - Listening on 0.0.0.0:8000 but http://0.0.0.0:8000/test.html gives “Page Not Found”

前端 未结 10 1314
情歌与酒
情歌与酒 2020-12-29 04:54

After cding to my folder I enter

python -m SimpleHTTPServer

and get

Serving HTTP on 0.0.0.0 port 8000 ...
<
10条回答
  •  时光说笑
    2020-12-29 05:20

    Try browsing to http://localhost:8000/test.html or http://127.0.0.1:8000/test.html (those two should be exactly the same thing as long as your hosts file isn't all crazy-like).

    0.0.0.0 is usually used by Windows as the "Not connected" IP, and can also be used as a sort of wildcard for when dealing with IPs. I am a bit confused at why your HTTP server is trying to host on 0.0.0.0, though. You may need to edit some config files and set that to 'localhost' or '127.0.0.1'.

提交回复
热议问题