Can't access localhost via IP address

后端 未结 2 797
情歌与酒
情歌与酒 2021-02-07 01:09

I\'m viewing a locally hosted website (using grunt serve, if that matters). I can view it via http://localhost:9000/ or http://127.0.0.1:9000/

2条回答
  •  借酒劲吻你
    2021-02-07 01:38

    If you are using Python 3.8, this is a known bug. The solution is to manually specify the IP address with the -bind argument or use Python 3.9.

    python -m http.server 8000 --bind 127.0.0.1 (or 0.0.0.0, )

提交回复
热议问题