how to setup for localhost:8000

Pierre Quentel pierre.quentel at gmail.com
Sun Apr 17 13:11:24 EDT 2016


> > 127.0.0.1 - - [15/Apr/2016 20:57:32] "GET / HTTP/1.1" 200 -
>  Hi Pierre,
> 
> When I type http://localhost:8000, I did not see anything in the console after the line "Serving HTTP on 0.0.0.0 port 8000 ... I believe the way I ran was not correct as shown below:
> > python -m http.server 
> Serving HTTP on 0.0.0.0 port 8000 ...
> 
> Also if I use internet Explorer, it shows HTTP 404 errors.
> Do you think the way I am doing of the localhost:8000 setting was not correct?
> 
> Thanks,
> Wen-Ruey

If you're not seeing anything there, it is sure that the Python server doesn't serve requests on port 8000. But if you're seeing a blank screen or a 404 error instead of a message saying that a connection couldn't be set up, it is likely that another HTTP server is running on your machine on port 8000.

Could you try to start the server on another port, eg "python -m http.server 8085" and see what happens in the browser with "http://127.0.0.1:8085" ?



More information about the Python-list mailing list